Configure NTP in Linux

Lakshani Gamage
1 min readFeb 5, 2020

--

  1. Check the current configuration of NTP server with the below command.
    ntpq -p
  2. If the server is not setup with NTP server, edit /etc/ntp.conf
  • Add the NTP server IP Address to the ntp configuration file

server 10.11.01.88 iburst

  • Comment or remove the existing lines starting with ‘server’ from the configuration file

# server 0.rhel.pool.ntp.org iburst

# server 1.rhel.pool.ntp.org iburst

# server 2.rhel.pool.ntp.org iburst

# server 3.rhel.pool.ntp.org iburst

3. Restart the NTP service and let your time server synchronize to its upstream servers.

sudo service ntpd restart

4. Verify NTP server has updated correctly with the below command.

ntpq -p

--

--

Lakshani Gamage
Lakshani Gamage

Written by Lakshani Gamage

I am Lakshani Gamage, a post graduate from the University of Colombo, School of Computer. I’m working as a Senior Software Engineer at Mitra Innovation.

No responses yet