timedatectl

Control system time, date, timezone, and NTP settings via systemd.

Category: Systemd / Time NTP Timezone Clock systemd

What it does

timedatectl is a systemd utility used to query and control system time, hardware clock, timezone, and NTP synchronization.

How it works (mechanical)

  • Communicates with systemd-timedated.
  • Reads/writes system clock settings.
  • Controls NTP synchronization (if enabled).
  • Manages timezone configuration.

10 Practical Examples

# 1) Show current time and status
timedatectl
# 2) List available timezones
timedatectl list-timezones
# 3) Set timezone
sudo timedatectl set-timezone America/New_York
# 4) Enable NTP synchronization
sudo timedatectl set-ntp true
# 5) Disable NTP
sudo timedatectl set-ntp false
# 6) Manually set date/time
sudo timedatectl set-time "2026-02-11 14:30:00"
# 7) Check if system clock is synchronized
timedatectl status
# 8) Show hardware clock (RTC) mode
timedatectl | grep RTC
# 9) Set RTC to local time (dual-boot systems sometimes require this)
sudo timedatectl set-local-rtc 1
# 10) Reset RTC to UTC (recommended for servers)
sudo timedatectl set-local-rtc 0

Notes & Gotchas

  • Servers should typically use UTC (RTC in UTC).
  • Dual-boot Windows systems sometimes expect local RTC time.
  • NTP must be reachable for sync to succeed.
  • Time drift can break Kerberos, AD logins, and certificate validation.

Historical Context

Before systemd, admins configured time via hwclock, date, and direct edits to /etc/localtime. timedatectl centralizes and standardizes this control.

Modern Equivalent

On systemd systems, timedatectl is the standard interface. Legacy tools include hwclock, ntpq, and chronyc.

Related Commands

  • hwclock — hardware clock management
  • chronyc — Chrony NTP control
  • ntpq — NTP query tool
  • date — basic time display/set
  • systemctl — manage time services