Skip to main content

timedatectl Cheatsheet

By Dejan Panovski Updated on Download PDF

Quick reference for checking time status, changing time zones, controlling NTP sync, and setting the system clock with timedatectl

timedatectl is the systemd command-line tool for viewing and changing the system time, date, time zone, RTC settings, and NTP synchronization. This cheatsheet covers the most useful commands for day-to-day time management and troubleshooting.

Basic Status

Check the current time, date, time zone, and sync state.

CommandDescription
timedatectlShow current time, time zone, and NTP status
timedatectl statusShow the same formatted status explicitly
timedatectl showShow status in key-value format
timedatectl show --property=Timezone --valuePrint the current time zone only
timedatectl show --property=NTPSynchronized --valuePrint whether the clock is synchronized

Time Zones

List and change time zone settings.

CommandDescription
timedatectl list-timezonesList all available time zones
timedatectl list-timezones | grep -i berlinFilter the time zone list
sudo timedatectl set-timezone Europe/BerlinSet the system time zone
sudo timedatectl set-timezone Etc/UTCSwitch the system back to UTC
timedatectl show --property=Timezone --valueConfirm the current time zone in scripts

NTP Synchronization

Enable, disable, and inspect time synchronization.

CommandDescription
sudo timedatectl set-ntp trueEnable automatic time sync
sudo timedatectl set-ntp falseDisable automatic time sync
timedatectl timesync-statusShow the current NTP server, offset, and poll interval
timedatectl show-timesyncShow timesync details in key-value format
timedatectl show --property=NTP --valueShow whether NTP is enabled

Set Time and Date

Disable NTP first when setting the clock manually.

CommandDescription
sudo timedatectl set-ntp falseTurn off NTP before manual changes
sudo timedatectl set-time '2026-04-21 14:30:00'Set both date and time
sudo timedatectl set-time '14:30:00'Set the time only
sudo timedatectl set-time '2026-04-21'Set the date only
sudo timedatectl set-ntp trueRe-enable NTP after manual changes

RTC and Hardware Clock

Control whether the RTC uses UTC or local time.

CommandDescription
timedatectl show --property=LocalRTC --valueCheck whether the RTC uses local time
sudo timedatectl set-local-rtc 0Set the RTC to UTC
sudo timedatectl set-local-rtc 1Set the RTC to local time
sudo timedatectl set-local-rtc 1 --adjust-system-clockSwitch RTC mode and adjust the system clock
timedatectlConfirm the RTC in local TZ status line

Script-Friendly Output

Extract single values for shell scripts and automation.

CommandDescription
timedatectl show --property=Timezone --valueGet the current time zone
timedatectl show --property=LocalRTC --valueGet the RTC mode
timedatectl show --property=CanNTP --valueCheck whether NTP is supported
timedatectl show --property=NTP --valueCheck whether NTP is enabled
timedatectl show --property=NTPSynchronized --valueCheck whether the clock is synchronized

Remote and Container Use

Run timedatectl against another host or a local container.

CommandDescription
timedatectl -H user@server statusCheck time settings on a remote host over SSH
timedatectl -H root@server set-timezone UTCChange the remote host time zone
timedatectl -M mycontainer statusCheck time settings in a local container
timedatectl -M mycontainer show --property=Timezone --valuePrint the container time zone only

Quick Fixes

Use these when timedatectl does not behave as expected.

CommandDescription
sudo timedatectl set-ntp falseFix Automatic time synchronization is enabled before set-time
timedatectl timesync-statusCheck which server is syncing the clock
timedatectl --no-pagerPrint directly without opening a pager
sudo date -s '2026-04-21 14:30:00'Set the clock on non-systemd systems where timedatectl does not work

Use these articles for deeper explanations and step-by-step instructions.

GuideDescription
How to Set or Change the Time Zone in LinuxChange the system time zone with timedatectl, tzdata, or /etc/localtime
date Command in LinuxRead and set the system clock with the traditional date command
journalctl CheatsheetInspect time sync and service logs from the systemd journal