Consistent system time keeps log entries aligned, TLS certificates valid, cron jobs predictable, and clustered services in agreement; even a few minutes of drift can make debugging or authentication feel like chasing a ghost.

On modern Linux systems built around systemd, the kernel maintains the system clock while systemd-timesyncd queries remote NTP servers and adjusts time gradually, with timedatectl providing a front end for inspecting and controlling synchronization. The hardware real-time clock (RTC) is updated periodically so reboots still start from a sane baseline.

Configuration in this workflow assumes a systemd-based distribution where systemd-timesyncd is present, uses root privileges via sudo, and expects that no alternative NTP daemon like chronyd or ntpd is running at the same time to avoid competing adjustments and sudden clock jumps that can confuse databases or distributed systems.

Steps to synchronize time with NTP in Linux:

  1. Open a terminal with access to sudo privileges.
    $ whoami
    root
  2. Display current time configuration and NTP status using timedatectl.
    $ timedatectl status
                   Local time: Mon 2026-01-12 22:28:08 UTC
               Universal time: Mon 2026-01-12 22:28:08 UTC
                     RTC time: n/a
                    Time zone: Etc/UTC (UTC, +0000)
    System clock synchronized: yes
                  NTP service: active
              RTC in local TZ: no

    The fields System clock synchronized and NTP service indicate whether time is already being tracked by an NTP client.

  3. Enable NTP-based synchronization through systemd-timesyncd.
    $ sudo timedatectl set-ntp true

    This command instructs systemd to manage time using its built-in NTP client rather than leaving the clock unmanaged.

  4. Confirm that NTP synchronization is now active.
    $ timedatectl status
                   Local time: Mon 2026-01-12 22:28:09 UTC
               Universal time: Mon 2026-01-12 22:28:09 UTC
                     RTC time: n/a
                    Time zone: Etc/UTC (UTC, +0000)
    System clock synchronized: yes
                  NTP service: active
              RTC in local TZ: no
  5. Check for any other NTP daemons such as chronyd or ntpd that might still be enabled.
    $ systemctl status chronyd ntp
    Unit chronyd.service could not be found.
    Unit ntp.service could not be found.

    Only one NTP client should manage the clock; running systemd-timesyncd alongside chronyd or ntpd can cause oscillating or unstable system time.

  6. Disable and stop any legacy NTP services that should no longer control time.
    $ sudo systemctl disable --now ntp
    Failed to disable unit: Unit file ntp.service does not exist.
  7. Edit the /etc/systemd/timesyncd.conf file to define explicit NTP servers when custom sources are required.
    $ sudo nano /etc/systemd/timesyncd.conf
    #  This file is part of systemd.
    #
    # Entries in this file show the compile time defaults.
    ##### snipped #####
    
    [Time]
    NTP=192.0.2.53
    FallbackNTP=192.0.2.54

    NTP entries specify preferred servers, while FallbackNTP provides alternatives if the primary pool is unreachable.

  8. Restart the systemd-timesyncd service so configuration changes take effect.
    $ sudo systemctl restart systemd-timesyncd

    Incorrect server names or blocked outbound UDP port 123 can prevent synchronization; always verify connectivity to the chosen NTP endpoints after modifying /etc/systemd/timesyncd.conf.

  9. Inspect detailed synchronization status using the timesync view from timedatectl.
    $ timedatectl timesync-status
           Server: 185.125.190.57 (ntp.ubuntu.com)
    Poll interval: 1min 4s (min: 32s; max 34min 8s)
             Leap: normal
          Version: 4
          Stratum: 2
        Reference: C279CFF9
        Precision: 1us (-25)
    Root distance: 831us (max: 5s)
           Offset: +32.889ms
            Delay: 196.451ms
           Jitter: 0
     Packet count: 1
        Frequency: +500.000ppm

    Small Offset and reasonable Root distance indicate healthy synchronization to a nearby, reliable NTP source.

  10. Verify that the reported local time matches an external reference such as a trusted NTP site or another already-correct system.
    $ date
    Mon Jan 12 22:28:09 UTC 2026
  11. Review recent logs for systemd-timesyncd if synchronization still appears inactive or offset values remain large.
    $ journalctl --unit=systemd-timesyncd --since "15 minutes ago"
    Jan 12 22:25:36 host.example.net systemd[1]: systemd-timesyncd.service - Network Time Synchronization was skipped because of an unmet condition check (ConditionVirtualization=!container).
    Jan 12 22:26:17 host.example.net systemd[1]: Starting systemd-timesyncd.service - Network Time Synchronization...
    Jan 12 22:26:17 host.example.net systemd[1]: Started systemd-timesyncd.service - Network Time Synchronization.
    Jan 12 22:26:18 host.example.net systemd-timesyncd[1290]: Contacted time server 185.125.190.58:123 (ntp.ubuntu.com).
    Jan 12 22:26:18 host.example.net systemd-timesyncd[1290]: Initial clock synchronization to Mon 2026-01-12 22:26:18.248722 UTC.
    Jan 12 22:28:09 host.example.net systemd[1]: Stopping systemd-timesyncd.service - Network Time Synchronization...
    Jan 12 22:28:09 host.example.net systemd[1]: systemd-timesyncd.service: Deactivated successfully.
    Jan 12 22:28:09 host.example.net systemd[1]: Stopped systemd-timesyncd.service - Network Time Synchronization.
    Jan 12 22:28:09 host.example.net systemd[1]: Starting systemd-timesyncd.service - Network Time Synchronization...
    Jan 12 22:28:09 host.example.net systemd[1]: Started systemd-timesyncd.service - Network Time Synchronization.
    Jan 12 22:28:09 host.example.net systemd-timesyncd[1426]: Contacted time server 185.125.190.57:123 (ntp.ubuntu.com).
    Jan 12 22:28:09 host.example.net systemd-timesyncd[1426]: Initial clock synchronization to Mon 2026-01-12 22:28:09.515978 UTC.