Sync Linux System Clock with a Remote NTP Server

NTP stands for Network Time Protocol is an internet protocol, which is used to synchronize the system clock between computers.

Please note that you must have NTP installed on the system to enable automatic time synchronization with NTP servers.

Start by using timedatectl to find if the network time synchronization (NTP) service is active and your system clock synchronized:

Configuring NTP :

Use the set-ntp argument to enable or disable automatic synchronization of your system clock with a remote server over the Network Time Protocol (NTP). Use the following command to enable this feature:

# timedatectl set-ntp yes or # timedatectl set-ntp 0 or # timedatectl set-ntp true

Use the following command to disable this automatic synchronization over NTP:

# timedatectl set-ntp no or # timedatectl set-ntp 1 or # timedatectl set-ntp false

If using a service like chrony or ntpd to make changes, these are not shown by timedatectl until systemd-timedated is restarted:

# systemctl restart systemd-timedated

Leave a Comment

Your email address will not be published. Required fields are marked *