Ubuntu Tips: 8 - Network Time Protocol

This document contains the steps necessary to configure the Ubuntu to synchronise the system clock with network time servers

Author: Matthew Wittering | Published: 14th November 2009

NTP is a TCP/IP protocol for synchronising time over a network. Basically a client requests the current time from a server to set its own clock. Simply it is to synchronises the clock of your computer with an other system over a network or the Internet.

Step 1 - Installation

To install the service and start synchronising your computer with network time servers run the following command at the terminal of your target machine.

$ sudo apt-get install ntp

Step 2 - Configuration

By default the NTP Server comes preconfigured to use ntp.ubuntu.com as the reference point to compare its time against your systems current time measurement. You can add further time servers to increase accuracy and reliability. I have configured my system to use the pool.ntp.org as a second server to synchronise my system.

To specify other servers edit /etc/ntp.conf to include additional servers so it may read as:

# You do need to talk to an NTP server or two (or three).
server ntp.ubuntu.com
server pool.ntp.org

Bing, Google or Yahoo for NTP servers in your region and add these to your configuration file. For example if you are in Europe look for servers close to your location to reduce on latency time when updating your server.

For more information read about the pool.ntp.org servers browse to the NTP Pool Project.

This work is licenced under a Creative Commons Licence

A brief introduction

Matthew WitteringI am a graduate of Lougborough University where I read Computing and Management BSc (Hons) earning a 2:1 classification.

Currently I am working in the Product Team as a Junior Product Manager at Ask Jeeves UK. Continue