How to install and configure NTP on Linux

NTP state for Network Time Protocol, needed for computer system time synchronization. What you need first in order to be in position to manage locations for synchronization on your computers is to install NTP.

Start your Ubuntu Server and type following commands:

server@ubuntu:~$ sudo apt-get install ntp

Provide password and confirm installation.

Next step is to edit ntp.conf file which is located on /etc/ntp.conf . Use Nano or Vi editor in order to change or comment current NTP servers. Start with following:

nano /etc/ntp.conf

Output of default settings will be:

# Use servers from the NTP Pool Project. Approved by Ubuntu Technical Board
# on 2011-02-08 (LP: #104525). See http://www.pool.ntp.org/join.html for
# more information.
server 0.ubuntu.pool.ntp.org
server 1.ubuntu.pool.ntp.org
server 2.ubuntu.pool.ntp.org
server 3.ubuntu.pool.ntp.org

 

Replace current servers with following:

server 0.europe.pool.ntp.org
server 1.europe.pool.ntp.org
server 2.europe.pool.ntp.org
server 3.europe.pool.ntp.org

Your file now should looks like following:

# Use servers from the NTP Pool Project. Approved by Ubuntu Technical Board
# on 2011-02-08 (LP: #104525). See http://www.pool.ntp.org/join.html for
# more information.
server 0.europe.pool.ntp.org
server 1.europe.pool.ntp.org
server 2.europe.pool.ntp.org
server 3.europe.pool.ntp.org

In order to apply these changes save your ntp.conf and restart NTP service with following command:

sudo service ntp reload

I hope that this tutorial was informative to you and thank you for visiting this website.

Dejan Dzodan

Dejan Dzodan

IT professional for more then 15 years, mostly in financial institutions but with experience in ISP and retail. Proven in networking and overall infrastructure projects. Cisco instructor.

Leave a Reply

Your email address will not be published. Required fields are marked *


7 + 9 =