I use 14.04.1-Ubuntu. When execute date
in command line, I get time which about 1 min different comparing Greenwich Mean Time or other source. I synchronized it using sudo ntpdate -s time.nist.gov
few months ago but it jumped away again. Why does it happen? How to keep accurate time on Ubuntu continuously?

- 221
- 1
- 6
- 12
-
Why is it downvoted? – Justas May 25 '17 at 08:27
3 Answers
How to keep accurate time on Ubuntu continuously?
By enabling the ntpd
service and running it continuously.
I synchronized it using
sudo ntpdate -s time.nist.gov
few months ago but it jumped away again. Why does it happen?
The hardware clock in computer systems is simply not accurate enough.

- 77,029
- 24
- 135
- 201
Unfortunately Ubuntu hasn't added the disclaimer from NTP.org's ntp-4.2.*\html\ntpdate.html
manual to Ubuntu's ntpdate(8)
manpage, like for example FreeBSD has:
ntpdate
- set the date and time via NTPDisclaimer: This program has known bugs and deficiencies and nobody has volunteered to fix them in a long time. The good news is the functionality originally intended for this program is available in the
ntpd
andsntp
programs.See the Deprecating
ntpdate
topic in the NTP Support wiki for a thorough discussion and analysis of the issues. See the-q
command line option in thentpd
- Network Time Protocol (NTP) daemon page and/or thesntp
- Simple Network Time Protocol (SNTP) Client page. After a suitable period of mourning, thentpdate
program will be retired from this distribution.
If Ubuntu did so, you wouldn't even have to Google for this, not to mention asking it from Serverfault.

- 46,944
- 3
- 83
- 129
-
1To be fair, if you use `ntpd -q` only once in months, you won't yield better results. – Sven May 17 '17 at 08:13
-
1True, but the point of this answer is that if this disclaimer was in the manpage, it would have directed OP to the right direction: `ntpdate` is deprecated, let's see what there is on `man ntpd`. Now it's not even in the "See also" section. I truly hope that reading `man ntpd` would enlighten the topic enough for not using merely `-q`. – Esa Jokinen May 17 '17 at 08:20
-
- Install ntp package
sudo apt-get install ntp
- Edit
/etc/ntp.conf
for your neighbor ntp serversudo vi +/^server /etc/ntp.conf
- Reload ntp configuration
sudo service ntp reload
- Check time sync status with
ntpq -p
. It takes some while for synchronized (*) status.sudo ntpq -p
Ref: Ubuntu 14.04 >> Ubuntu Server Guide >> Networking