NTP — Time Synchronization

Linux
Systemd
Published

August 29, 2023

Modified

February 12, 2026

Why is time synchronization required?

Most modern Linux systems use one of the following components to sync time:

Check current time status:

>>> timedatectl status
               Local time: Thu 2026-02-12 09:23:41 CET
           Universal time: Thu 2026-02-12 08:23:41 UTC
                 RTC time: Thu 2026-02-12 08:23:41
                Time zone: Europe/Berlin (CET, +0100)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no

Types of clocks:

Chrony

Command Description
chronyd The daemon (runs in background)
chronyc Command-line client to control/query it

Show synchronization status (stratum, drift, current offset

>>> chronyc tracking
Reference ID    : 8CB55A16 (ntp.example.org)
Stratum         : 3
Ref time (UTC)  : Thu Feb 12 08:28:06 2026
System time     : 0.000000040 seconds slow of NTP time
Last offset     : +0.000039854 seconds
RMS offset      : 0.000029645 seconds
Frequency       : 60.475 ppm slow
Residual freq   : +0.033 ppm
Skew            : 0.109 ppm
Root delay      : 0.016435383 seconds
Root dispersion : 0.023702158 seconds
Update interval : 130.6 seconds
Leap status     : Normal
  • Leap statusNormal means system is synced
  • Stratum — Level in the NTP hierarchy
    • 0 highly accurate reference clocks (atomic & GPS clocks)
    • 1 NTP servers directly connected to stratum 0 devices
    • 2 NTP servers sync their time from stratum 1 servers
    • 3+ NTP servers sync their time from stratum 2 servers, and so on
  • Offset — Time difference between client and reference NTP server

Configuration

Main configuration file for Chrony:

/etc/chrony.conf
server 0.pool.ntp.org iburst
server 1.pool.ntp.org iburst
server 2.pool.ntp.org iburst
server 3.pool.ntp.org iburst

driftfile /var/lib/chrony/drift
makestep 1.0 3
rtcsync

Restart chronyd so the changes in the config file take effect:

  • server — Specify a remote NTP server (hostname or IP address)
    • iburst First initial synchronization faster
    • Multiple servers to increase redundancy and improve accuracy
  • driftfile — Information about how much your system’s clock is drifting
  • makestep — How to to make adjustments to the system clock
  • rtcsync — System time is written to the hardware clock periodically

Verify NTP sources:

chronyc sources -v

systemd-timesyncd

timedatectl                                 # show time and time zone configuration
timedatectl set-time YYYY-MM-DD             # change the current date
timedatectl set-time HH:MM:SS               # change the current time
timedatectl list-timezones                  # list available time zones
timedatectl set-timezone <zone>             # set a given time zone, e.g. Europe/Berlin
grep ^Servers /etc/systemd/timesyncd.conf   # list time servers 
timedatectl set-ntp true                    # enable NTP
timedatectl set-local-rtc 0                 # RTC in UTC mode
timedatectl set-local-rtc 1                 # RTC in locel time mode
systemctl start systemd-timesyncd           # start the time sync daemon 
systemctl enable systemd-timesyncd          # make the time sync daemon boot persistant