Chrony is a versatile and lightweight network time synchronization software available for various Linux distributions, including Ubuntu 20.04. By accurately synchronizing the system clock, Chrony ensures reliable timekeeping, essential for numerous networked applications and services. This guide provides step-by-step instructions to installing Chrony on Ubuntu 20.04, enabling you to keep your system time precise and well-synchronized.
To install Chrony on Ubuntu 20.04, you need to meet the following requirements:
– A Linux VPS with Ubuntu 20.04 Operating System
– Administrative privileges
– An active internet connection to download and install packages.
Before installing Chrony, it is advisable to update your system packages to ensure you have the latest versions. Open a terminal or SSH session and execute the following command:
sudo apt update sudo apt upgrade
Once the system is up to date, Chrony can be installed using the Ubuntu package manager. Run the following command to installing Chrony on Ubuntu:
sudo apt install chrony
Once Chrony is installed, open the configuration file using your preferred text editor. In this example, we will use the nano editor:
sudo nano /etc/chrony/chrony.conf
Inside the configuration file, you will find a section titled “pool” that contains a list of NTP time servers. By default, these servers are commented out with “#“. Uncomment any server you wish to use, or add your own server.
For example, to use the NTP pool servers, remove the “#” from the following lines:
#pool 2.debian.pool.ntp.org offline iburst #pool 3.debian.pool.ntp.org offline iburst
Save the file and exit the text editor.
To enable NTP synchronization, you need to edit the default configuration file:
sudo nano /etc/default/chrony
Find the line that says “NTPD_OPTS=…” and add “-c /etc/chrony/chrony.conf” at the end of the line. The line should appear as follows:
NTPD_OPTS='-q -g -c /etc/chrony/chrony.conf'
Save the file and exit the text editor.
Start and enable the Chrony service using the systemctl commands:
sudo systemctl start chronyd
sudo systemctl enable chronyd
Chrony will now synchronize the system time with the configured NTP servers.
To verify that Chrony is functioning correctly, use the following command:
chronyc tracking
This will display the tracking status, including information on time sources and synchronization.
If you have a firewall enabled on your system, consider allowing NTP traffic so that Chrony can communicate with NTP servers. Use the following command to allow outbound NTP traffic:
sudo ufw allow out 123/udp
By following this guide, you have successfully learned about installing Chrony on Ubuntu 20.04. Chrony will ensure accurate time synchronization, which is vital for many system operations and services. Remember to periodically update your configuration and keep your NTP servers up to date for reliable synchronization. With Chrony installed, your Ubuntu 20.04 system will maintain accurate timekeeping.
How useful was this post?
Click on a star to rate it!
Average rating 5 / 5. Vote count: 1
No votes so far! Be the first to rate this post.
Spigot is an open-source Java project that allows users to run their Minecraft server. It also allow...
Redis is a kind of data structure storage and is used as a message broker, key-value database, and a...
What is your opinion about this Blog?