How to Install and Use Chrony in Linux?
Last Updated :
05 Oct, 2021
chrony is a flexible Network Time Protocol implementation (NTP). It can sync the system clock with NTP servers, reference clocks (such as a GPS receiver), and manual input via wristwatch and keyboard. It can also act as an NTPv4 (RFC 5905) server and peer, allowing other computers on the network to receive timely updates.
A local server must use an NTP client to get the correct time from a remote NTP server. One such customer is Chrony. Chrony is an excellent option for this reason because it is designed to operate in a variety of situations, including unreliable and/or highly congested network connections, as well as other adverse conditions. At boot time, Chrony synchronizes the computer’s internal clock with higher Stratum NTP servers, a reference clock, or the computer’s real-time clock. Using a wristwatch and a keyboard, it can also be manually synchronized with the input. This is not the most reliable form of synchronization, and it is strongly discouraged.
On a LAN, the precision between two synchronized machines is usually within a few milliseconds. Chrony is divided into two systems: chronyc and chronyd.
- Chronyc is a command-line interface for monitoring and tweaking chronyd’s output.
- Chronyd is a background-running daemon that starts and activates the chrony NTP service and tracks the time and status of the time-server.
The chrony.conf file specifies the time NTP server that chronyd tracks. The primary feature of the Chronyd system is to obtain accurate time from one of the major NTP server sources. If the server time is off, chronyd will adjust the device clock to compensate.
Chrony includes two programs:
- chronyd — daemon that can be started at boot time
- chronyc — command-line interface for chrony
How to Install Chrony in Linux:
Chrony may be installed by default on certain devices. And if the kit is missing, it is simple to install. Using the command below, use your default package manager utility on your respective Linux distributions.
# yum -y install chrony [On CentOS/RHEL]
# apt install chrony [On Debian/Ubuntu]
# dnf -y install chrony [On Fedora 22+]

installing chrony
To check the status of chronyd use the following command:
# systemctl status chronyd [On SystemD]
# /etc/init.d/chronyd status [On Init]
Enable chrony daemon upon boot with the following command:
- Residual freq — residual frequency indicated the difference between the measurements from the reference source and the frequency currently being used.
- Skew — estimated error bound of the frequency.
- Root delay — Total of the network path delays to the stratum computer, from which the computer is being synced.
- Leap status — this is the leap status that can have one of the following values – normal, insert second, delete second, or not synchronized.
# systemctl enable chronyd [On SystemD]
# chkconfig --add chronyd [On Init]
To Check Chrony Synchronization in Linux:
We’ll use chrony’s command-line software, chronyc, to see whether it’s actually synchronized. It has a monitoring feature that will provide useful details.
# chronyc tracking

result of Check Chrony Synchronization
The listed files provide the following information:-
- Residual freq — Residual frequency indicated the difference between the measurements from the reference source and the frequency currently being used.
- Skew — Estimated error bound of the frequency.
- Root delay — Total of the network path delays to the stratum computer, from which the computer is being synced.
- Leap status — This is the leap status which can have one of the following values – normal, insert second, delete second, or not synchronized.
- Reference ID — The reference ID and name to which the computer is currently synced.
- Stratum — Number of hops to a computer with an attached reference clock.
- Ref time — This is the UTC time at which the last measurement from the reference source was made.
- System time — Delay of system clock from the synchronized server.
- Last offset — Estimated offset of the last clock update.
- RMS offset — Long-term average of the offset value.
- Frequency — This is the rate by which the system’s clock would be wrong if chronyd is not correcting it. It is provided in ppm (parts per million).
To check information about chrony’s sources:
# chronyc sources

Check Chrony Sources
Configure Chrony in Linux:
The configuration file of chrony is located at /etc/chrony.conf or /etc/chrony/chrony.conf and the sample configuration file may look something like this:

The above configuration provides the following information:
- Server — this directive used to describe an NTP server to sync from.
- stratumweight — how much distance should be added per stratum to the sync source. The default value is 0.0001.
- Driftfile — location and name of the file containing drift data.
- Makestep — this directive causes chrony to gradually correct any time offset by speeding or slowing down the clock as required.
- logdir — path to chrony’s log file.
If you want to step the system clock immediately and ignoring any adjustments currently being in progress:
# chronyc makestep
If you decide to stop chrony, you can use the following commands:
# systemctl stop chrony [On SystemD]
# /etc/init.d/chronyd stop [On Init]
This was a demonstration of the chrony utility and how to use it on a Linux system.
Similar Reads
How to Install and Use Chrony in Linux?
chrony is a flexible Network Time Protocol implementation (NTP). It can sync the system clock with NTP servers, reference clocks (such as a GPS receiver), and manual input via wristwatch and keyboard. It can also act as an NTPv4 (RFC 5905) server and peer, allowing other computers on the network to
5 min read
How to Install Python-arrow on Linux?
Arrow is a Python library for performing tasks with date and time. It presents a sensible and human-friendly approach to creating, manipulating, formatting, and converting dates, times, and timestamps. Arrow allows easy creation of date and time instances with timezone awareness. So, in this article
1 min read
How to install Gnome-Calendar in Ubuntu
This package provides the "calendar" application, which displays future relevant dates on a variety of calendars and is widely seen on BSD-style systems. A calendar app is first and foremost a scheduling tool. It allows you to create blocks on a calendar to plan out your day. A calendar app may be u
2 min read
How to Change Time in Kali Linux
Kali Linux is a popular Debian-based Linux distribution used for pen-testing and ethical hacking. It is developed and maintained by an American cybersecurity firm, Offensive Security. Kali Linux comes pre-installed with various tools and software required for penetration testing and ethical hacking,
4 min read
How to Install python-dateutil on Linux?
The dateutil module provides many options to the standard datetime module, available in Python2 and Python3. Or we can say that it gives extensions to the DateTime module in Python. It provides computing of relative deltas like next month, next year, last week, etc. Its time zone information is base
1 min read
How to Build Your Own Commands in Linux?
Linux is one of the most widely used open-source operating systems which supports both GUI as well as CLI. It has been widely used all over the world since its first distribution launched on September 17, 1991, by Linus Torvalds. It is widely known for its command-line operations. We have been using
6 min read
How to install Gnome-Clock on Ubuntu?
On the Ubuntu Operating System, you can use Different Desktop Environments that can give you another level of feeling while using the computer. The GNOME on Ubuntu is one of the Best Desktop Environments. With the GNOME Desktop Environment, you can even Configure GNOME Clock on Ubuntu which can be u
4 min read
How to Inject Current Day and Time into HTML?
HTML allows us to embed dynamic content like the current day and time using JavaScript. By injecting real-time information into an HTML document, we can create interactive and user-friendly web pages. This process can be easily achieved using various methods, such as the <time> tag or JavaScri
2 min read
How to Check Timezone in Linux
There are a number of time management utilities available on Linux such as timedatectl, date, etc by which you can view the current timezone in your Linux system. In this article, we will be discussing some ways by which you can check the system timezone in Linux. Method 1: Using the command timeda
3 min read
How to Set Up Cron Jobs in Ubuntu
Setting up cron jobs in Ubuntu allows you to automate repetitive tasks such as backups, clearing logs, or maintaining system. This guide will walk you through the steps to configure cron jobs in Ubuntu, providing detailed instructions and practical examples. Whether you're a system administrator or
5 min read