Back to the command reference

timedatectl

SystemFundamentalsReference only

Show or set time and time zone

Name: timedatectl = time and date control

This command is outside what the site lets you practise (mostly distribution-specific or rarely used tools). This page describes how to use it; try it on your own Linux system.

Description

timedatectl, part of systemd, shows and sets the system time, date and time zone and whether to sync over the network (NTP).

Syntax

timedatectl [COMMAND]

Common options

statusShow the time, time zone and sync state (as with no arguments)
set-timezoneSet the time zone
list-timezonesList time zones
set-timeSet the time by hand, e.g. set-time "2026-01-15 09:30"
set-ntpTurn network time sync on or off

Examples

  • $ timedatectl

    Current time, zone and sync status

    Explain
  • $ sudo timedatectl set-timezone Asia/Shanghai

    Set the zone to Asia/Shanghai

    Explain

Related