Time sync on Ubuntu 18.04

I will give an example of setting time synchronization on Ubuntu Server 18.04.

In Ubuntu 18, the systemd-timesyncd service is enabled by default and time synchronization reports can be seen in the /var/log/syslog file, for example:

systemd-timesyncd[979]: Synchronized to time server (ntp.ubuntu.com)

In the configuration file /etc/systemd/timesyncd.conf, you can see the standard values for some parameters that can be uncommented and changed:


For example, in order to synchronize time approximately once a day:


Restart systemd-timesyncd to apply the changes:

systemctl restart systemd-timesyncd.service
systemctl status systemd-timesyncd.service

Let’s see the current time settings:


I have displayed:

                      Local time: Mon 2020-07-13 22:07:45 EEST
                  Universal time: Mon 2020-07-13 19:07:45 UTC
                        RTC time: Mon 2020-07-13 19:07:45
                       Time zone: Etc/UTC (EEST, +0300)
       System clock synchronized: yes
systemd-timesyncd.service active: yes
                 RTC in local TZ: no

To disable time synchronization, you can do:

timedatectl set-ntp off

Check the status of the service (should not be started and disabled):

systemctl status systemd-timesyncd.service
systemctl is-enabled systemd-timesyncd.service

If necessary, you can turn it back on:

timedatectl set-ntp on

Example time zone changes:

timedatectl list-timezones
timedatectl list-timezones | grep -i europe
timedatectl set-timezone Europe/Kiev

Example of manual time setting:

timedatectl set-time 2020-07-14 11:08:00

See also my article:
Configuring NTP Client and NTP Server in Linux

Leave a comment

Leave a Reply