What it does
Without arguments timedatectl shows local time, UTC, RTC time, time zone, whether the clock is synchronized and whether the NTP service (chronyd) is active. Subcommands change these settings.
How to write it
timedatectl [OPTION]... [COMMAND]Main parts
status- Show the settings (default).
show- Settings as key=value (for scripts).
set-time"YYYY-MM-DDHH:MM:SS"- Set the clock (NTP must be off).
set-timezoneZONE- Set the time zone.
list-timezones- All zone names.
set-local-rtc0|1- RTC in UTC (0) or local time (1).
set-ntptrue|false- Turn NTP sync (chronyd) on or off.
timesync-status,show-timesync,ntp-servers,revert- For systemd-timesyncd (not used by default on RHEL).
Options 11
Most used
Nothing matches this filter.
Examples 10
$ run as a normal user# run as root (or with sudo)
1Show all settings
timedatectl Local time: Sun 2026-10-25 11:42:10 +03 Universal time: Sun 2026-10-25 08:42:10 UTC RTC time: Sun 2026-10-25 08:42:10 Time zone: Asia/Riyadh (+03, +0300) System clock synchronized: yes NTP service: active RTC in local TZ: noEverything at once.
2Set the time zone
timedatectl set-timezone Asia/RiyadhChanges the /etc/localtime link.
3Find a zone name
timedatectl list-timezones | grep -i amsterdam Europe/AmsterdamExact names are needed.
4Turn NTP on
timedatectl set-ntp trueStarts and enables chronyd.
5Set the time by hand
timedatectl set-ntp false timedatectl set-time "2026-10-25 12:00:00"Only for labs without a time server.
6RTC in UTC
timedatectl set-local-rtc 0Recommended for servers.
7Value for a script
timedatectl show -p NTPSynchronized --value yesMonitoring check.
8Check many servers
for h in server1 server2; do ssh $h timedatectl show -p Timezone --value; doneSame zone everywhere?
9Time zone link
ls -l /etc/localtime lrwxrwxrwx. 1 root root 33 Oct 25 11:40 /etc/localtime -> ../usr/share/zoneinfo/Asia/RiyadhWhat set-timezone changed.
10Unsynced clock alert (security)
Wrong time breaks TLS, Kerberos and log analysis.
Nothing matches this filter.
Exit codes
0 :: Done. 1 :: Error.