timedatectl — time, time zone, and synchronization
cheat sheet · Ubuntu 24.04 · systemd https://lab.dimsanych.ru/en/wiki/timedatectl/Cheat sheet
-
timedatectltime, time zone, sync status -
sudo timedatectl set-timezone Europe/Moscowchange the time zone -
sudo timedatectl set-ntp trueenable NTP synchronization -
timedatectl timesync-statusserver, delay, offset -
chronyc trackingthe same with chrony -
date -ucurrent time in UTC
Options
set-time requires auto-synchronization to be off: with set-ntp true
active, the service immediately reverts the time, and a manual change
will look like it didn't take effect. set-local-rtc switches the
hardware clock's format between UTC (correct for a Linux server) and
local time (only needed for dual-booting with Windows).