Configure NTP client
To configure your Linux system as an NTP client, you will need to install the ntp daemon (ntpd). You can do this with the sudo apt-get install ntp command:
The ntpd configuration file is located at /etc/ntp.conf. Open this file in a text editor:
This file contains the list of NTP servers that will be used for time synchronization. By default, Ubuntu servers will be used (e.g. 0.ubuntu.pool.ntp.org). You can add your preferred servers or leave the defaults.
Next, restart the NTP deamon with the sudo service ntp reload command:
And that’s it! You system should synchronize time with NTP servers listed in the ntp.conf file. You can use the ntpq -p command to show a list of all the NTP servers and when they where last checked: