[email protected]Office hours: Mon – Fri 9:00AM – 5:00PMLinkedInXFacebook
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 Implement Network Segmentation and Resource Isolation in Linux.
February 6, 2024

How to Implement Network Segmentation and Resource Isolation in Linux.

How to Implement Network Segmentation and Resource Isolation in Linux. Securing and managing networks in a Linux environment involves advanced practices like network segmentation and resource isolation. This guide explores these concepts, providing detailed instructions and examples for…

Read article
How to open or close ports in Linux.
February 6, 2024

How to open or close ports in Linux.

How to open or close ports in Linux. Effectively managing ports on your Linux system is crucial for both security and service accessibility. This comprehensive guide will provide a detailed walkthrough on opening and closing ports using the robust tools iptables and ufw. Understanding these…

Read article
How to use ypdomainname command.
January 23, 2024

How to use ypdomainname command.

How to use ypdomainname command. In the realm of Linux networking, the ypdomainname command plays a crucial role in the context of the Network Information Service (NIS). NIS, formerly known as Yellow Pages, is a distributed database service that facilitates the sharing of network configuration and…

Read article
Get in Touch

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

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

Get Started →Contact Us
[email protected]Office hours: Mon – Fri 9:00AM – 5:00PM