How To Install systemd-timesyncd on Rocky Linux 8

In this tutorial we learn how to install systemd-timesyncd on Rocky Linux 8. systemd-timesyncd is System daemon to synchronize local system clock with NTP server

Introduction

In this tutorial we learn how to install systemd-timesyncd on Rocky Linux 8.

What is systemd-timesyncd

systemd-timesyncd is a system service to synchronize the local system clock with a remote Network Time Protocol server. It specifically implements only SNTP; this minimalistic service will set the system clock for large offsets or slowly adjust it for smaller deltas.

We can use yum or dnf to install systemd-timesyncd on Rocky Linux 8. In this tutorial we discuss both methods but you only need to choose one of method to install systemd-timesyncd.

Install systemd-timesyncd on Rocky Linux 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install systemd-timesyncd using dnf by running the following command:

sudo dnf -y install systemd-timesyncd

Install systemd-timesyncd on Rocky Linux 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install systemd-timesyncd using yum by running the following command:

sudo yum -y install systemd-timesyncd

How To Uninstall systemd-timesyncd on Rocky Linux 8

To uninstall only the systemd-timesyncd package we can use the following command:

sudo dnf remove systemd-timesyncd

systemd-timesyncd Package Contents on Rocky Linux 8

/etc/systemd/timesyncd.conf
/usr/lib/.build-id
/usr/lib/.build-id/4e
/usr/lib/.build-id/4e/44b684771c054b3b4955ee129a04e93f59994a
/usr/lib/.build-id/83
/usr/lib/.build-id/83/0dc86f33dcbe41121a8571e267e3642dd67e9a
/usr/lib/systemd/ntp-units.d
/usr/lib/systemd/ntp-units.d/80-systemd-timesync.list
/usr/lib/systemd/system/systemd-time-wait-sync.service
/usr/lib/systemd/system/systemd-timesyncd.service
/usr/lib/systemd/system/systemd-tmpfiles-clean.service.d
/usr/lib/systemd/system/systemd-tmpfiles-clean.service.d/10-time-set.conf
/usr/lib/systemd/system/time-set.target
/usr/lib/systemd/system/time-sync.target.d
/usr/lib/systemd/system/time-sync.target.d/10-time-set.conf
/usr/lib/systemd/systemd-time-wait-sync
/usr/lib/systemd/systemd-timesyncd
/usr/share/dbus-1/system-services/org.freedesktop.timesync1.service
/usr/share/dbus-1/system.d/org.freedesktop.timesync1.conf
/usr/share/licenses/systemd-timesyncd
/usr/share/licenses/systemd-timesyncd/LICENSE.LGPL2.1
/usr/share/man/man5/timesyncd.conf.5.gz
/usr/share/man/man5/timesyncd.conf.d.5.gz
/usr/share/man/man8/systemd-time-wait-sync.8.gz
/usr/share/man/man8/systemd-time-wait-sync.service.8.gz
/usr/share/man/man8/systemd-timesyncd.8.gz
/usr/share/man/man8/systemd-timesyncd.service.8.gz
/var/lib/systemd/timesync
/var/lib/systemd/timesync/clock

References

Summary

In this tutorial we learn how to install systemd-timesyncd on Rocky Linux 8 using yum and dnf.