How to Synchronize Time on Linux Using Chrony

Why Replace NTPD with Chrony?

Accurate timekeeping is critical for Linux servers, as mismatched clocks can break database replication, cause SSL certificate errors, and completely ruin log file correlations. For decades, the standard tool was the ntpd daemon. However, Chrony has largely replaced it in modern distributions (like RHEL 8/9 and Ubuntu 20.04+). Chrony synchronizes the system clock much faster, requires less memory, and performs significantly better in environments with intermittent network connections or virtual machines that frequently pause and resume.

Step 1: Install the Chrony Package

First, verify if Chrony is already installed. If not, use your package manager.

On Debian/Ubuntu systems:

sudo apt update && sudo apt install chrony -y

On RHEL/CentOS/Rocky Linux systems:

sudo yum install chrony -y

Step 2: Configure the Time Servers

The main configuration file is located at /etc/chrony/chrony.conf (Ubuntu/Debian) or /etc/chrony.conf (RHEL/CentOS). Open the file in a text editor:

sudo nano /etc/chrony/chrony.conf

Look for lines starting with pool or server. These point to the public NTP servers Chrony uses to fetch the time. It is highly recommended to use the regional NTP pool for your location. For example, if you are in North America, replace the default lines with:

pool north-america.pool.ntp.org iburst

The iburst option tells Chrony to send a rapid burst of packets upon starting, allowing it to sync the clock almost instantly on boot.

Step 3: Enable and Restart the Service

Save and close the configuration file. To apply the new time servers, restart the chronyd service and ensure it is enabled to start automatically:

sudo systemctl restart chronyd

sudo systemctl enable chronyd

Step 4: Verify the Synchronization Status

Unlike ntpd, Chrony provides an excellent command-line utility for checking synchronization status. Run the following command:

chronyc tracking

Look at the Leap status field. If it says “Normal”, your system is successfully synchronized. You can also view the exact stratum and offset in this output.

Step 5: View Connected NTP Servers

If you want to see exactly which remote time servers your machine is communicating with, and how stable the connection is, use the sources command:

chronyc sources -v

The -v flag provides a helpful verbose header explaining what the symbols mean. A server with an asterisk (*) next to it indicates the primary time source Chrony is actively using to synchronize the local clock.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.