timedatectl Command in Linux: Manage Time, Date, and Time Zone

By 

•

Updated on

•

12 min read

timedatectl command output showing system time and time zone in a Linux terminal

Wrong system time can break TLS checks, make cron jobs run at the wrong hour, and leave logs with misleading timestamps. On systemd-based Linux systems, timedatectl is the standard tool for checking and changing time settings.

timedatectl is part of systemd and is available on most systemd-based distributions. It handles time zones, NTP synchronization, RTC settings, and manual time adjustments from the command line. This guide explains how to use it with practical examples.

Syntax

txt
timedatectl [OPTIONS] COMMAND

When called without any arguments, timedatectl shows the current status, which is the same as running timedatectl status.

Check Current Time and Date

Run timedatectl with no arguments to see the full time status:

Terminal
timedatectl
output
               Local time: Tue 2026-04-14 12:00:00 CEST
           Universal time: Tue 2026-04-14 10:00:00 UTC
                 RTC time: Tue 2026-04-14 10:00:00
                Time zone: Europe/Berlin (CEST, +0200)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no

The output shows the local time in your configured time zone, the same moment in UTC, and the hardware clock (RTC) time. System clock synchronized: yes means NTP has synced the clock recently. NTP service: active means an NTP daemon, such as chrony or systemd-timesyncd, is running and managing synchronization.

If RTC in local TZ shows yes, the hardware clock is set to local time rather than UTC. Most Linux systems keep the hardware clock in UTC, which avoids daylight saving time complications when rebooting.

Set the Time Zone

To set the system time zone, use set-timezone followed by a time zone identifier:

Terminal
sudo timedatectl set-timezone America/New_York

After running this, timedatectl shows the new time zone immediately. The change persists across reboots.

If you do not know the exact time zone identifier, use list-timezones:

Terminal
timedatectl list-timezones

The list is long, so pipe it through grep to filter by region:

Terminal
timedatectl list-timezones | grep America
output
America/Adak
America/Anchorage
America/Anguilla
America/Antigua
America/Araguaina
America/Argentina/Buenos_Aires
...
America/New_York
...

Time zone identifiers follow the Region/City format, such as Europe/Paris, Asia/Tokyo, or Australia/Sydney. For a step-by-step walkthrough, see the guide on how to set or change the time zone in Linux .

Enable and Disable NTP Synchronization

NTP (Network Time Protocol) keeps the system clock accurate by periodically syncing it against internet time servers. timedatectl can enable or disable NTP management:

Terminal
sudo timedatectl set-ntp true
Terminal
sudo timedatectl set-ntp false

After enabling NTP, run timedatectl to confirm NTP service: active appears in the output.

Turn off NTP before setting the time manually. If NTP is active, timedatectl rejects direct clock changes.

Set the Time and Date Manually

To set the clock manually, you must first disable NTP synchronization:

Terminal
sudo timedatectl set-ntp false

Then set the time and date using the set-time subcommand. You can provide a full timestamp:

Terminal
sudo timedatectl set-time '2026-04-15 14:30:00'

To set only the time and keep the current date:

Terminal
sudo timedatectl set-time '14:30:00'

To set only the date, pass it without a time:

Terminal
sudo timedatectl set-time '2026-04-15'

Be careful with this form. It does not keep the current time; when the time part is omitted, the clock is set to 00:00:00 on that date. Pass the full timestamp if you want to change the date and keep a specific time.

After setting the time, you can re-enable NTP to let the system sync automatically afterward:

Terminal
sudo timedatectl set-ntp true

Set the Hardware Clock Mode

The RTC, or hardware clock, can store time in UTC or in local time. Linux systems should normally keep the RTC in UTC because it avoids daylight saving time issues and works better on servers.

To make sure the hardware clock uses UTC, run:

Terminal
sudo timedatectl set-local-rtc 0

If you dual-boot with an operating system that expects the hardware clock to use local time, you can switch the RTC to local time:

Terminal
sudo timedatectl set-local-rtc 1

After changing the RTC mode, run timedatectl again and check the RTC in local TZ line. Use local RTC only when another operating system on the same machine requires it.

Check NTP Synchronization Status

The timedatectl status output tells you whether the clock is synchronized, but not which server it uses or how far off it was. For that detail, you need to ask the NTP daemon itself, and the command depends on which daemon your system runs.

To find out, check which service is active:

Terminal
systemctl is-active chrony chronyd systemd-timesyncd

On Fedora and RHEL the chrony service is named chronyd, while on Ubuntu and Debian it is chrony. The line that prints active tells you which daemon manages the clock.

chrony

Ubuntu 25.10 and newer, Fedora, and RHEL use chrony by default. To see the server the system is currently synced to and the measured offset, run:

Terminal
chronyc tracking
output
Reference ID    : B97DBE7A (ntp-nts-2.ps5.canonical.com)
Stratum         : 3
Ref time (UTC)  : Mon Sep 28 19:34:57 2026
System time     : 0.196533591 seconds slow of NTP time
Last offset     : -0.000744150 seconds
RMS offset      : 0.000744150 seconds
Frequency       : 1.632 ppm slow
Residual freq   : +90.618 ppm
Skew            : 22.969 ppm
Root delay      : 0.061411798 seconds
Root dispersion : 0.002272600 seconds
Update interval : 2.0 seconds
Leap status     : Normal

Reference ID is the server the clock follows right now. System time shows how far the system clock is from NTP time; chrony normally corrects this gradually instead of jumping the clock. Leap status: Normal means the clock is synchronized. If it shows Not synchronised, chrony is not currently synchronized, even if it has received replies from a server. Check chronyc sources for the source states.

To list all configured servers and their state, use chronyc sources:

Terminal
chronyc sources
output
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
^* ntp-nts-2.ps5.canonical.>     2   6    17     2    +25us[ -719us] +/-   31ms
^+ ntp-nts-3.ps5.canonical.>     2   6    17     3   +817us[  +72us] +/-   32ms
^+ ntp-nts-2.ps6.canonical.>     2   6    17     2  -2139us[-2883us] +/-   90ms
^+ ntp-nts-3.ps6.canonical.>     2   6    17     2  -2673us[-3417us] +/-   92ms
^- ntp-nts-1.ps6.canonical.>     2   6    17     3   -811us[-1556us] +/-   95ms

The * marks the server currently used for synchronization, + marks good servers that are combined with it, and - marks usable sources that are not currently selected. A ? means the source is not selectable, for example because it is unreachable, is not synchronized itself, or has not provided enough measurements yet.

systemd-timesyncd

Debian and Ubuntu 24.04 and earlier use systemd-timesyncd. On these systems, timedatectl can show the sync details itself with timesync-status:

Terminal
timedatectl timesync-status
output
       Server: 185.125.190.56 (ntp.ubuntu.com)
Poll interval: 34min 8s (min: 32s; max 34min 8s)
         Leap: normal
      Version: 4
      Stratum: 2
    Reference: 17.253.52.253
    Precision: 1us (-19)
Root distance: 19.455ms (max: 5s)
       Offset: -2.408ms
        Delay: 29.124ms
       Jitter: 5.716ms
 Packet count: 5

Offset is how far your system clock drifted before the last sync. A small offset, under a few hundred milliseconds, is normal. A large offset can point to network problems or a misconfigured time source.

timesync-status only works when systemd-timesyncd is handling NTP. On a system that uses chrony, it fails with Command requires systemd-timesyncd.service, but it is not available. Use chronyc tracking there instead.

Configure NTP Servers

timedatectl can turn synchronization on and off, but it does not choose the NTP servers. The server list lives in the configuration of the NTP daemon, so you change it there and restart or reload the service.

chrony on Ubuntu and Debian

On Ubuntu and Debian, chrony reads extra server entries from /etc/chrony/sources.d/. Create a new file there with your server:

Terminal
echo "server time.example.com iburst" | sudo tee /etc/chrony/sources.d/local-ntp.sources

Replace time.example.com with your NTP server. The iburst option sends a quick burst of requests at startup so the first sync happens faster. Tell chrony to load the new file without restarting it:

Terminal
sudo chronyc reload sources

Run chronyc sources to confirm the new server appears in the list. Your server is added next to the default pools. On Ubuntu, you can disable those pools by renaming /etc/chrony/sources.d/ubuntu-ntp-pools.sources so it no longer ends in .sources, then reloading the sources again.

Disabling that file does not guarantee that chrony uses only your server. Check /etc/chrony/chrony.conf and its included configuration files for other server, pool, or peer entries. DHCP can also supply servers through sourcedir /run/chrony-dhcp; comment out that directive if you want to exclude them. After changing chrony.conf or its included configuration files, run sudo systemctl restart chrony, then check chronyc sources again.

chrony on Fedora and RHEL

On Fedora and RHEL, the servers are defined in /etc/chrony.conf. Open the file, replace the existing pool line with your server, and restart the service:

/etc/chrony.conftxt
server time.example.com iburst
Terminal
sudo systemctl restart chronyd

systemd-timesyncd

For systemd-timesyncd, the cleanest way is a drop-in file, which survives package upgrades. Create the directory and the file:

Terminal
sudo mkdir -p /etc/systemd/timesyncd.conf.d
sudo nano /etc/systemd/timesyncd.conf.d/local.conf

Add your servers under the [Time] section. NTP= takes a space-separated list. The empty NTP= line clears earlier global server entries before adding yours. FallbackNTP= is used only when no other server is configured:

/etc/systemd/timesyncd.conf.d/local.confini
[Time]
NTP=
NTP=time.example.com
FallbackNTP=ntp.ubuntu.com

Restart the service to apply the change:

Terminal
sudo systemctl restart systemd-timesyncd

Check timedatectl timesync-status afterward. The Server: line shows the selected server. Per-interface servers, including those supplied through DHCP by systemd-networkd, can still be used alongside your global list. To use only your server, also disable or change those entries in the network configuration.

Machine-Parseable Output

The show subcommand prints the same information as status in a key-value format that is easier to parse in scripts:

Terminal
timedatectl show
output
Timezone=Europe/Berlin
LocalRTC=no
CanNTP=yes
NTP=yes
NTPSynchronized=yes
TimeUSec=Tue 2026-04-14 10:00:00 UTC
RTCTimeUSec=Tue 2026-04-14 10:00:00 UTC

Pass --property to extract a single value:

Terminal
timedatectl show --property=Timezone --value
output
Europe/Berlin

This is useful in automation and configuration management scripts where you need to check the current time zone without parsing the human-readable status output.

For timesync details in key-value format, use show-timesync:

Terminal
timedatectl show-timesync

This gives scripts access to systemd-timesyncd properties such as the current server name, poll interval, and root distance. Like timesync-status, it works only on systems that use systemd-timesyncd.

timedatectl Options

  • --no-ask-password - Do not prompt for a password when an operation needs extra privileges; fail instead
  • --adjust-system-clock - With set-local-rtc, set the system clock from the RTC using the new mode, instead of writing the system clock to the RTC
  • --no-pager - Print output without piping through a pager
  • -p NAME, --property=NAME - Show one named property from show output
  • -H ADDR, --host=ADDR - Execute the command on a remote host over SSH
  • -M MACHINE, --machine=MACHINE - Execute the command inside a local container

Quick Reference

For a printable quick reference, see the timedatectl cheatsheet .

CommandDescription
timedatectlShow current time, time zone, and NTP status
timedatectl showShow status in key-value format (script-friendly)
timedatectl list-timezonesList all available time zone identifiers
sudo timedatectl set-timezone TZSet the time zone (e.g., America/New_York)
sudo timedatectl set-ntp trueEnable NTP synchronization
sudo timedatectl set-ntp falseDisable NTP synchronization
sudo timedatectl set-time 'YYYY-MM-DD HH:MM:SS'Set time and date manually (NTP must be off)
sudo timedatectl set-local-rtc 0Store the hardware clock in UTC
chronyc trackingShow the current NTP server and offset on chrony systems
chronyc sourcesList configured NTP servers on chrony systems
timedatectl timesync-statusShow NTP sync detail (systemd-timesyncd only)
timedatectl show-timesyncShow NTP sync detail in key-value format (systemd-timesyncd only)
timedatectl show --property=Timezone --valuePrint the current time zone name only

Troubleshooting

Failed to set time: Automatic time synchronization is enabled
NTP is active and has locked the clock. Disable NTP first with sudo timedatectl set-ntp false, then run your set-time command.

Failed to set time zone: Access denied as the requested operation requires interactive authentication
You need administrator privileges, and timedatectl could not ask for a password (for example, in a script or a non-interactive SSH session). Prepend sudo to the command.

Failed to connect to bus: No such file or directory
timedatectl communicates with systemd-timedated over D-Bus. This error usually appears in minimal containers or chroot environments where systemd is not running. Configure the clock on the host or outside the chroot. Ordinary containers share the host clock and lack the CAP_SYS_TIME capability, so sudo date -s usually fails there too. You can still read the time with the date command.

Command requires systemd-timesyncd.service, but it is not available
timesync-status and show-timesync need systemd-timesyncd, which is not installed. This is the normal result on Ubuntu 25.10 and newer, Fedora, and RHEL, where chrony handles NTP. Check the sync state with chronyc tracking instead.

timedatectl: command not found
The timedatectl executable is missing or is not in your PATH. On a systemd-based host, check whether the distribution package that provides it is installed. On a non-systemd host, use date to read the clock and, with the required privileges, set it. Inside a container, read the time with date and configure the clock on the host.

FAQ

What is the difference between timedatectl and the date command?
date reads and formats timestamps, and it can set the system clock with sudo date -s. timedatectl is the systemd tool that also manages time zones, the RTC, and NTP synchronization. On systemd-based systems, use timedatectl for time configuration and date for formatting timestamps.

Does timedatectl work on non-systemd distributions?
No. timedatectl is part of systemd and requires systemd-timedated and D-Bus to be running. On systems without systemd (such as Alpine Linux with OpenRC), use the date command and edit /etc/localtime or /etc/timezone directly.

How do I check which NTP servers the system is using?
timedatectl does not show the server list; the NTP daemon does. On systems with chrony, run chronyc sources. On systems with systemd-timesyncd, run timedatectl timesync-status for the current server, or timedatectl show-timesync --all to see the configured and fallback servers. To change the servers, see the Configure NTP Servers section.

How do I view historical time changes in system logs?
timedatectl itself does not keep a history, but the system journal does. Search the logs of your NTP service, for example:

Terminal
journalctl -u chrony

On systems with systemd-timesyncd, use journalctl -u systemd-timesyncd instead.

For more on reading system logs, see the journalctl guide .

Conclusion

For day-to-day administration, timedatectl is usually enough to check the current time settings, switch time zones, toggle NTP, and inspect RTC behavior. If you need distribution-specific time zone steps, see the guide on how to set or change the time zone in Linux .

Linuxize Weekly Newsletter

A quick weekly roundup of new tutorials, news, and tips.

About the authors

Dejan Panovski

Dejan Panovski

Dejan Panovski is the founder of Linuxize, an RHCSA-certified Linux system administrator and DevOps engineer based in Skopje, Macedonia. Author of 1000+ Linux tutorials with 20+ years of experience turning complex Linux tasks into clear, reliable guides.

View author page