Most servers are probably automatically configured to network time, but if you want to set it up for yourself, or want to change the servers that you are syncing to, here’s the quick article that shows you how to do it.

Since I had to do this earlier today, I decided it would make a lot of sense to write it down for the next time that I need to do it. Yeah, this article is really just for me.

First, you’ll need to install NTP if it isn’t already installed. For Debian or Ubuntu, that would be this command:

sudo apt-get install ntp

For Redhat or CentOS, you’ll need to use these commands to install ntp and enable it:

yum install ntp

systemctl enable ntpd

Then you’ll want to edit the /etc/ntp.conf file, which is quite possibly already filled out for you.

vi /etc/ntp.conf

You’ll find a lot of lines in there, but the important ones are the server lines. You can get a list of server addresses at, find the preferred ones for your area, and then add them to the file. For my purposes, that meant:


Then you’ll need to restart or start the NTPD service:

/etc/init.d/ntpd restart

If you want to update the time right now, you can stop the NTP service and then run the following command, swapping out your preferred server for


Fairly simple.

Profile Photo for Lowell Heddings Lowell Heddings
Lowell is the founder and CEO of How-To Geek. He’s been running the show since creating the site back in 2006. Over the last decade, Lowell has personally written more than 1000 articles which have been viewed by over 250 million people. Prior to starting How-To Geek, Lowell spent 15 years working in IT doing consulting, cybersecurity, database management, and programming work.
Read Full Bio »