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

2 answers

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.

by noemy.bosco , 20 days ago

@modesta 

Here are the summarized steps to configure NTP (Network Time Protocol) on Ubuntu:

  1. Install the NTP package by running: sudo apt-get install ntp
  2. Open the NTP configuration file with a text editor: sudo nano /etc/ntp.conf
  3. Add NTP servers to the configuration file as needed. For example:
1
2
server ntp.ubuntu.com
server ntp2.ubuntu.com


  1. Save the changes to the configuration file and exit the text editor.
  2. Restart the NTP service: sudo systemctl restart ntp
  3. Check the status of the NTP service to ensure it is running: sudo systemctl status ntp


Following these steps will configure NTP on your Ubuntu system and synchronize the system clock with the specified NTP servers.