Linux – time sync with ntpd

linux

I run Debian on several systems, and their times do not seem to stay in sync. I can run ntpdate manually, but I thought that I should have an ntpd running that would automate that.

I did check with apt and apt-cache but don't find any ntpd (or associated ntpq), not any such names in my system (locate…), but ntp-doc does still describe them.

Looking around I see that there is an ntpdate-debian command, and it uses /etc/default/ntpdate for servers (instead of the standard /etc/ntp.conf), but even thought that file is there and has "yes" indicated to use ntp.conf, it fails with "no servers can be used", although ntpdate works fine. Is this just a layer over ntpdate, any reason to use it instead?

So, why are they missing, do I need them, how do I automate time updates?

Associated, two of my machines are virtualized on a MSoft VM, how is it that their clocks drift, and both to different values? (The underlying Windows machine clock seems stable). I see a few old notes about time & ntp problems on VMware, didn't find anything either current or relating to MSoft VMs. Anything I did see says just to use ntpd, but as above, …?!

Best Answer

The package you are looking for is ntp, which provides daemon and utilities for time synchronization.