snippetbashTip
timedatectl — Control the system time and date. More information: <https://www.freedesktop.org/software/systemd/ma
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:
timedatectlSet the local time of the system clock directly:
timedatectl set-time "{{yyyy-MM-dd hh:mm:ss}}"List available timezones:
timedatectl list-timezonesSet the system timezone:
timedatectl set-timezone {{timezone}}Enable Network Time Protocol (NTP) synchronization:
timedatectl set-ntp onChange the hardware clock time standard to localtime:
timedatectl set-local-rtc 1Code Snippets
Check the current system clock time
timedatectlSet the local time of the system clock directly
timedatectl set-time "{{yyyy-MM-dd hh:mm:ss}}"List available timezones
timedatectl list-timezonesSet the system timezone
timedatectl set-timezone {{timezone}}Enable Network Time Protocol (NTP) synchronization
timedatectl set-ntp onContext
tldr-pages: linux/timedatectl
Revisions (0)
No revisions yet.