I agree with above answers, but it is overkill in most circumstances to have the average user or server box running a full NTP server/service/daemon.
And why install extra system software? If it's good enough for the Ubuntu system to set system time (see next paragraph) being brought up, it's fine for most syncs needed by the avg user.
Unless your system clock is constantly off (like some of my machines) or you need very precise time-keeping round-the-clock, a sync is done each time the network interface is brought up ( see: /etc/network/if-up.d/ntpdate
).
If you do need system clock updates occasionally, but do not want to run a full NTPd service, there is nothing wrong with using ntpdate
to update your system when you like.
I do this via cron. You may wish to do a root crontab or crond hourly (or daily) using ntpdate:
sudo nano /etc/cron.hourly/synctime
Note: The filename of the script called by run-parts
should have NO extension or odd characters. Your script will not get picked up if this is the case. I choose the single lowercase name above ("synctime" - no extension).
Then add this to that script:
#!/bin/sh
/usr/sbin/ntpdate -s 192.168.1.1 # < local or remote (name or IP) for NTP server here
Save. Then make executable:
sudo chmod 755 /etc/cron.hourly/synctime
Every hour ntpdate will sync to server of your choice. (Default cron.hourly time on mine is processed ~17 minutes after the hour)
..in addition to the system default sync done when interface comes up (usually when system comes up after a reboot).
I personally run the ntpd
server on my main Ubuntu server (stays sync'd from accurate ntp server pools on Internet) - which in turn feeds all of my LAN machines via ntpdate
as per above - as the client. This way my LAN is synchronized from one local point using Ubuntu's default ntpdate utility.

ntpq -p
. It shows the next contact moment in seconds for each server configured (default four from the volunteer pool). This time will increase after some time and NTP will "learn" about the clock skew on your system. This depends all on your configuration and the behaviour of your clock. It's a complicated but very efficient algorithm. Therefore it also takes some time before it will function as designed. – gertvdijk Aug 27 '13 at 10:21tinker panic 0
to ntp.conf or add-g
to command line options in /etc/default/ntp. This is much cleaner than sopping ntpd, ntpdate/sntp, starting ntpd. – dfc Jan 19 '14 at 17:00