Set the Timezone with timedatectl

timedatectl lists, sets, and verifies the system timezone and NTP sync status on systemd distributions.

LinuxtimedatectltimezonesystemdMedium risk
Run `sudo timedatectl set-timezone Asia/Shanghai` to change the timezone (use `timedatectl list-timezones` to find valid names).

01Command

Command
$ sudo timedatectl set-timezone Asia/Shanghai

02What it does

Run `timedatectl` alone to see the current zone, clock, and whether NTP is active; `timedatectl list-timezones | grep -i shanghai` helps find the exact zone name. Enabling sync is `sudo timedatectl set-ntp true`. Zone changes apply to new processes immediately, but long-running daemons may need a restart to pick up the new local time.

03Risk

RiskMedium risk
Requirementssystemd-based distribution

04Undo

Undo
$ sudo timedatectl set-timezone UTC

05Sources

  • timedatectl(1) - Linux manual page
    Ubuntu Manpages · technical · 2026-09-17
    Evidence: timedatectl set-timezone sets the system timezone, list-timezones shows available zones, and set-ntp controls network time synchronization.

Last verified: 2026-09-17 · Category: System & Settings

06Related solutions