If the current time on your computer is not correct, you will need to adjust the time before updating and installing the clock service

The following steps will show you how to install the NTP service on Ubuntu for clock synchronization.

Update the system

To update the system, run sudo apt-get update.

Install the NTP client

To install the NTP client, run the sudo apt-get install NTP command.

Check the installation

Usually after a service is installed, we verify the installation.

Run the following command to verify.

sntp --version
Copy the code

If you can see the version number on the screen, the service has been successfully installed.

Configure NTP Pool

The configuration file for the Pool is in the /etc/ntp.conf file. The main purpose of this Pool is to tell the Ubuntu NTP client where to find the time server.

It’s usually already configured by default.

pool 0.ubuntu.pool.ntp.org iburst
pool 1.ubuntu.pool.ntp.org iburst
pool 2.ubuntu.pool.ntp.org iburst
pool 3.ubuntu.pool.ntp.org iburst
Copy the code

You can choose a Pool server nearest to you by visiting the address pool.ntp.org: NTP Servers in North America, north-america.pool.ntp.org.

Usually this step is not necessary and there is no problem with using the default configuration.

Start the service and view the status

Run the command to start the service.

sudo systemctl restart ntp
sudo systemctl status ntp
Copy the code

The second command is to check the running status of the current NTP server.

The installation of the NTP service on Ubuntu is complete.

www.ossez.com/t/ubuntu-nt…