Just like an old fashioned grandfather clock, time time on your computer’s clock can slowly drift. You can quickly verify the accuracy of your clock by comparing it to https://time.is/. It’s not unusual for it to be anything from a few seconds to a couple of minutes out. For most purposes this is not a major issue, but there are some applications which are very time sensitive.

NTP (Network Time Protocol) is a tool which will synchronise your computer’s clock with a network of accurate time servers, ensuring that it’s always accurate.

There’s a lot to be said about NTP, but this is a quick guide to getting it up and running on an Ubuntu machine.

## Install

There’s a ntp package in the APT repository, so installation is simple.

The ntpd will start running. It will communicate with the time servers and bring your clock in line with the correct time.

## Configure

The configuration for NTP is found in /etc/ntp.conf. The default configuration will probably be perfectly sufficient. However, if you are an inveterate fiddler, then you might want to tweak some of the details.

The default configuration will point ntpd to a selection of generic servers run by the NTP Pool Project. These will redirect to a server geographically close to you.

You can find out about local servers by visiting the NTP Pool Project and selecting first your continent and then country.

## Check

It will take a short while for ntpd to connect to some time servers. Once it has you’ll be able to check the accuracy of your local clock using ntptime.