Set up Linux (Ubuntu) server to synchronise clock with NTP time server


ntupdate comes built in into Ubintu server. To manually adjust server time run:
sudo ntpdate
You can choose another ntp server instead of


To automatically keep server time up to date use ntp.

Install ntpd:
sudo apt-get install ntp

ntpd should start working immediately without any additional configuration. However you obviously can adjust settings if you wish.


ntpd configuration file is located in /etc/ntp.conf

Default server is server
To use additional servers just add them bellow server e.g.
# You do need to talk to an NTP server or two (or three).

To enable logging uncomment:
statsdir /var/log/ntpstats/
logs will be placed in /var/log/ntpstats/

Useful commands

Reastart ntp
sudo /etc/init.d/ntp restart
Stop ntp
sudo /etc/init.d/ntp stop
Start ntp
sudo /etc/init.d/ntp start

List peers and status
ntpq -p

Check in ntpd process is running
ps ax | grep ntp

Ubuntu Server 10.10


# Gene 2011-08-09 12:47


Subscribe to receive occasional updates on new posts.
Your email will not be used for any other purpose and you can unsubscribe at any time.
Please wait