Ubuntu Linux how to set the date and time via Network Time Protocol (NTP)

Ubuntu Linux how to set the date and time via Network Time Protocol (NTP)

To set the date and time on an Ubuntu Linux system using the Network Time Protocol (NTP), you will need to install the ntp package and configure it to synchronize the system clock with an NTP server.

To install the ntp package, use the apt-get command:

sudo apt-get update
sudo apt-get install ntp
Sourc‮.www:e‬lautturi.com

Once the ntp package is installed, you can configure it to synchronize the system clock with an NTP server by editing the /etc/ntp.conf file.

Find the server lines in the configuration file and replace them with the addresses of one or more NTP servers that you want to use. For example:

server ntp1.example.com
server ntp2.example.com
server ntp3.example.com

You can also specify a list of NTP servers provided by your network administrator or use the public NTP servers provided by the Network Time Foundation.

Once you have configured the ntp.conf file, restart the ntp service to apply the changes:

sudo service ntp restart

To manually synchronize the system clock with an NTP server, use the ntpdate command:

sudo ntpdate ntp1.example.com

Keep in mind that the ntp service will automatically synchronize the system clock at regular intervals, so you should not need to run the `nt

Created Time:2017-10-30 14:27:26  Author:lautturi