How to configure NTP (Network Time Protocol) on Ubuntu?

Member

by modesta , in category: Networking & Wireless , a year ago

How to configure NTP (Network Time Protocol) on Ubuntu?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by aglae_feil , a year ago

@modesta 

Configuring NTP (Network Time Protocol) on Ubuntu involves the following steps:

  1. Install the NTP package using the following command:
1
sudo apt-get install ntp


  1. Once the installation is complete, edit the NTP configuration file using the following command:
1
sudo nano /etc/ntp.conf


  1. In the configuration file, find the server entries and add the NTP servers that you want to use. For example, if you want to use the NTP servers provided by Ubuntu, you can add the following lines:
1
2
server ntp.ubuntu.com
server ntp2.ubuntu.com


  1. Save the configuration file and exit.
  2. Restart the NTP service using the following command:
1
sudo systemctl restart ntp


  1. Check the status of the NTP service using the following command:
1
sudo systemctl status ntp


You should now have successfully configured NTP on your Ubuntu system. The system clock should now be synchronized with the NTP servers.