Sync Linux Server Time with Network Time Server

Updated on September 3, 2017

If you want to sync your Linux server time with specific network time servers? Okay, quick steps for you!

* Ensure you have NTP installed. If not use the command below.

For installation on Debian or Ubuntu.

sudo apt-get install ntp

For Redhat or CentOS.

yum install ntp

* Locate the /etc/ntp.conf file. There you can find the server lines. Add your preferred server to the file.

* Now restart or start the NTPD service:

/etc/init.d/ntpd restart

* To update the time, stop the NTP service and run the command below, swapping out your preferred server for pool.ntp.org.

/usr/sbin/ntpdate pool.ntp.org

That’s it!

Was this article helpful?

Related Articles

Leave a Comment