[email protected]Support 24/7 · Billing 09:00 – 00:00LinkedInXFacebook
NexonHost
Netherlands Dedicated ServersAmsterdam · Equinix AM6Germany Dedicated ServersFrankfurt · Equinix FR4Romania Dedicated ServersBucharest · VoxilityAustria Dedicated ServersVienna · Interxion VIEBulgaria Dedicated ServersSofia · TelepointFrance Dedicated ServersParis · Interxion PAR — Marseille · Digital Realty MRS3Ireland Dedicated ServersDublin · Equinix DB2Italy Dedicated ServersMilan · Irideos AvalonPoland Dedicated ServersWarsawSpain Dedicated ServersMadrid · Equinix MD2United States Dedicated ServersAshburn · Equinix DC
All articles
Getting startedApril 18, 2023

How to start/enable timesyncd on Ubuntu 20.04 LTS

How To Start/Enable Timesyncd On Ubuntu 20.04 LTS

The systemctl command is used to manage system services on Ubuntu 20. One of the services it can manage is the systemd-timesyncd service, which is responsible for synchronizing the system clock.

The status option is used to display the current status of a service. When used with systemd-timesyncd, it will display whether the service is running or not, and if there are any errors or warnings.

To use the systemctl status systemd-timesyncd command on Ubuntu 20, open a terminal window and enter the command. The output will look something like this:

The output shows that the systemd-timesyncd service is running (Active: active (running)), and it also shows the time when it started (Active since), as well as any status messages or errors.

Overall, the systemctl status systemd-timesyncd command is a useful tool for checking the status of the systemd-timesyncd service on Ubuntu 20, and for troubleshooting any clock synchronization issues.

If the output of the systemctl status systemd-timesyncd command shows that the systemd-timesyncd service is not active, it means that the system clock is not being synchronized. There are several reasons why this might happen, and here is how you can take to troubleshoot the issue:

 

Check the NTP Configuration File

The systemd-timesyncd service uses the NTP configuration file (/etc/systemd/timesyncd.conf) to determine which NTP servers to use for clock synchronization. Make sure that the configuration file is properly configured with the correct NTP servers.

Open the NTP configuration file with the following command:

sudo nano /etc/systemd/timesyncd.conf

Make sure that the NTP option is not commented out, and that it points to the correct NTP servers. For example, from this :

#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See timesyncd.conf(5) for details.

[Time]
#NTP=
#FallbackNTP=ntp.ubuntu.com
#RootDistanceMaxSec=5
#PollIntervalMinSec=32
#PollIntervalMaxSec=2048

To this.

#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See timesyncd.conf(5) for details.

[Time]
NTP=<IP_of_your_NTP_Server>
FallbackNTP=<IP_of_your_NTP_Backup.Server>
RootDistanceMaxSec=5
PollIntervalMinSec=32
PollIntervalMaxSec=2048

FallbackNTP is an option in the systemd-timesyncd configuration file (/etc/systemd/timesyncd.conf) on Ubuntu 20.04 and other Linux systems. This option specifies a secondary NTP server to use if the primary NTP server specified in the NTP option is not reachable or does not respond within a certain amount of time.

In other words, if the systemd-timesyncd service is unable to synchronize the system clock with the primary NTP server, it will try to synchronize with the fallback NTP server specified in the FallbackNTP option.

Here’s an example of how the FallbackNTP option can be used in the timesyncd.conf file:

NTP=primary.server
FallbackNTP=backup.server

In this example, if the systemd-timesyncd service is unable to synchronize the system clock with primary.server , it will try to synchronize with backup.server.

It’s worth noting that the FallbackNTP option is optional, and if it is not specified, the systemd-timesyncd service will not use a fallback NTP server. Also, it’s important to choose a reliable and accurate fallback NTP server to ensure that the system clock is synchronized as accurately as possible.

Keep reading
How to use iostat command in  Linux.
September 15, 2023

How to use iostat command in Linux.

How To Use Iostat Command. The iostat command in Linux is used for monitoring system input/output statistics for devices and partitions. It monitors system input/output by observing the time the devices are active in relation to their average transfer rates. The iostat produce reports may be used…

Read article
How to use iconv command in Linux.
September 15, 2023

How to use iconv command in Linux.

How To Use Iconv Command. iconv command is used to convert some text in one encoding into another encoding. If no input file is provided then it reads from standard input. Similarly, if no output file is given then it writes to standard output. If no from-encoding or to-encoding is provided then…

Read article
How to use getopts command in Linux.
September 15, 2023

How to use getopts command in Linux.

How To Use Getopts Command. Shell scripting is a powerful way to automate tasks and create custom utilities in Unix-like operating systems such as Linux. When writing shell scripts, it’s common to need to process command-line arguments and options provided by users. The getopts command is a…

Read article
Get in Touch

Together, Let’s Build a Faster, Safer Internet.

Build scalable infrastructure with NexonHost — high-performance dedicated servers, VPS hosting, cloud hosting, and DDoS protection across Europe.

Get Started →Contact Us
[email protected]Support 24/7 · Billing 09:00 – 00:00