Reference: https://www.digitalocean.com/community/tutorials/how-to-set-up-time-synchronization-on-ubuntu-20-04
First, run apt update
to refresh your local package index:
Then, run apt install ntp
to install this package:
ntpd
will begin automatically after your installation completes. You can verify that everything is working correctly by querying ntpd
for status information:
If you want to setup a local server:
Then, you can create a drift file as following:
Finally you can restart the service: