HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

timedatectl — Control the system time and date. More information: <https://www.freedesktop.org/software/systemd/ma

Submitted by: @import:tldr-pages··
0
Viewed 0 times
thetimedatectlcommandandclitimecontrolsystem
linux

Problem

How to use the timedatectl command: Control the system time and date. More information: <https://www.freedesktop.org/software/systemd/man/latest/timedatectl.html>.

Solution

timedatectl — Control the system time and date. More information: <https://www.freedesktop.org/software/systemd/man/latest/timedatectl.html>.

Check the current system clock time:
timedatectl


Set the local time of the system clock directly:
timedatectl set-time "{{yyyy-MM-dd hh:mm:ss}}"


List available timezones:
timedatectl list-timezones


Set the system timezone:
timedatectl set-timezone {{timezone}}


Enable Network Time Protocol (NTP) synchronization:
timedatectl set-ntp on


Change the hardware clock time standard to localtime:
timedatectl set-local-rtc 1

Code Snippets

Check the current system clock time

timedatectl

Set the local time of the system clock directly

timedatectl set-time "{{yyyy-MM-dd hh:mm:ss}}"

List available timezones

timedatectl list-timezones

Set the system timezone

timedatectl set-timezone {{timezone}}

Enable Network Time Protocol (NTP) synchronization

timedatectl set-ntp on

Context

tldr-pages: linux/timedatectl

Revisions (0)

No revisions yet.