Time synchronisation on Ubuntu

Published: Sunday, 12 July 2020
By:
  • Jurn Ho
ubuntu

timesyncd is installed by default on Ubuntu 18 and Ubuntu 20.

Verify timesyncd is running

Verify systemd-timesyncd, the systemd unit, is active and running.

$ systemctl status systemd-timesyncd
● systemd-timesyncd.service - Network Time Synchronization
     Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled)
     Active: active (running) since Sun 2020-07-12 11:13:42 UTC; 10h ago
       Docs: man:systemd-timesyncd.service(8)
   Main PID: 789 (systemd-timesyn)
     Status: "Initial synchronization to time server 91.189.89.199:123 (ntp.ubuntu.com)."
      Tasks: 2 (limit: 38364)
     Memory: 2.5M
     CGroup: /system.slice/systemd-timesyncd.service
             └─789 /lib/systemd/systemd-timesyncd

Jul 12 11:13:42 cocoon systemd[1]: Starting Network Time Synchronization...
Jul 12 11:13:42 cocoon systemd[1]: Started Network Time Synchronization.
Jul 12 11:13:49 cocoon systemd-timesyncd[789]: Network configuration changed, trying to establish connection.
Jul 12 11:13:49 cocoon systemd-timesyncd[789]: Network configuration changed, trying to establish connection.
Jul 12 11:14:19 cocoon systemd-timesyncd[789]: Initial synchronization to time server 91.189.89.199:123 (ntp.ubuntu.com).

Verify the process is running

$ ps aux | grep timesyncd
systemd+     789  0.0  0.0  90388  6344 ?        Ssl  11:13   0:00 /lib/systemd/systemd-timesyncd
jurn        2620  0.0  0.0   6432   728 pts/0    S+   21:43   0:00 grep --color=auto timesyncd