timedatectl(1)
Query and change the system time and date settings, timezone, and NTP synchronization status.
Synopsis
timedatectl [OPTIONS...] COMMANDDescription
timedatectl is a systemd utility for managing the system clock and timezone settings. It queries and modifies the hardware clock (RTC), system time, timezone, and NTP (Network Time Protocol) synchronization status.
Changes made with timedatectl persist across reboots. The command communicates with systemd-timedated, the system service responsible for time and date settings.
Common options
| Flag | What it does |
|---|---|
--no-ask-password | Do not prompt for password when performing privileged operations |
--adjust-system-clock | Synchronize the hardware clock to the system time when setting the system time |
-H, --host=HOST | Execute operations on a remote host via SSH |
-M, --machine=CONTAINER | Execute operations in a local container or virtual machine |
--monitor | Monitor time and clock synchronization status changes in real-time |
-p, --property=NAME | Show only specified properties when querying status |
--value | When showing properties, print only the value (not the property name) |
-a, --all | Show all properties, including default ones |
Examples
Display current time, timezone, NTP status, and whether hardware clock is in UTC
timedatectlChange the system timezone to Eastern Time (requires root or sudo)
timedatectl set-timezone America/New_YorkShow all available timezone names you can set
timedatectl list-timezonesSet the system date and time manually (requires root or sudo)
timedatectl set-time '2024-01-15 14:30:00'Enable automatic time synchronization via NTP (requires root or sudo)
timedatectl set-ntp trueConfigure the hardware clock to use local time instead of UTC (requires root)
timedatectl set-local-rtc 1Display detailed NTP synchronization status and timing statistics
timedatectl show-timesyncShow the same information as calling timedatectl with no arguments
timedatectl status