How to sync time using NTP in Ubuntu server?

Linux server users might have noticed that after adjusting the system clock to the correct time, server loses the correct time within a while. Keeping your system’s time up to date is important, especially when you have time critical cron tabs to execute or you are required to examine the logs from a particular time of the day. That's when the network time protocol (NTP) comes into the picture. In this article we will explain the steps to setup an NTP server on your machine to adjust your machine's clock regularly.


Network time protocol


Network time protocol (NTP) enables you to synchronize your server’s system time with a remote server periodically. Thus, you can keep your system time accurate by syncing with known time servers.


How do I Install NTP Server?


To install the NTP server issue following command.

For Ubuntu/Debian

sudo aptitude update
sudo aptitude install ntp


Set NTP service to run at boot time


Once NTP server is installed ensure that service will run at boot time by running.
sudo /sbin/chkconfig ntpd on


Start the NTP service


To make sure the NTP service starts after installing issue following command.

sudo /etc/init.d/ntp start

By installing the NTP service your server is automatically setup to sync time with default NTP servers.

  • 0 Users Found This Useful

Was this answer helpful?

Related Articles

How to setup Database Map tool from WHM Panel?

cPanel provide a feature called Database Map tool. You can provide ownership of databases and...

How to Install and Configure the HAProxy on CentOS?

HAProxy is a very fast and decent tool to achieve high availability, load balancing. It can work...

Will internal traffic between two VPS viz. a Database Server and a Web Server be counted in my bandwidth usage?

Yes it will. The traffic will be counted in the bandwidth usage of your VPS. Even if you use...

How to Setup NTP Server in CentOS?

NTP enables the automatically sync your system time with a remote server. With the help of NTP...

Do You Provide TUN/TAP On VPS Hosting?

Typically, TUN/TAP is used when you want to utilize VPN services from your VPS. Windows VPS...