<- Back

ntp

Update
Get time from server
sudo ntpdate time.nist.gov
Update hardware clock to currently set time
sudo hwclock --systohc
Show
Show hardware clock
sudo hwclock --show
Show time information
timedatectl status
Query ntpd
ntpdc -c sysinfo
Services
ntpd
systemctl status ntpd.service
timesyncd
systemctl status systemd-timesyncd.service

Use only one service, either systemd-timesyncd or ntpd.

See here

systemd-timesyncd is more lightweight and is a client only (which I personally prefer), but it doesn’t train the system’s clock.

systemd-timesyncd is basically a small client-only NTP implementation more or less bundled with newer systemd releases. It’s more lightweight than a full ntpd but only supports time sync - i.e. it can’t act as an NTP server for other machines. It’s intended to replace ntpd for clients.

systemd-timesyncd does no clock discipline: the clock is not trained or compensated, and internal clock drift over time is not reduced. It has rudimentary logic to adjust poll interval but without disciplining the host will end up with uneven time forever as systemd-timesyncd pushes or pulls at whatever interval it thinks the near-term drift requires.

source

systemctl disable ntpd.service
systemctl stop ntpd.service

systemctl start systemd-timesyncd.service
systemctl enable systemd-timesyncd.service

timedatectl set-ntp 1