table of contents
- stretch 232-25+deb9u11
- testing 241-5
- stretch-backports 241-3~bpo9+1
- unstable 241-5
- experimental 242-2
TIMEDATECTL(1) | timedatectl | TIMEDATECTL(1) |
NAME¶
timedatectl - Control the system time and dateSYNOPSIS¶
timedatectl [OPTIONS...] {COMMAND}
DESCRIPTION¶
timedatectl may be used to query and change the system clock and its settings.Use systemd-firstboot(1) to initialize the system time zone for mounted (but not booted) system images.
OPTIONS¶
The following options are understood:--no-ask-password
--adjust-system-clock
-H, --host=
-M, --machine=
-h, --help
--version
--no-pager
The following commands are understood:
status
set-time [TIME]
set-timezone [TIMEZONE]
list-timezones
set-local-rtc [BOOL]
set-ntp [BOOL]
Note that even if time synchronization is turned off with this command, another unrelated system service might still synchronize the clock with the network. Also note that, strictly speaking, systemd-timesyncd.service does more than just network time synchronization, as it ensures a monotonic clock on systems without RTC even if no network is available. See systemd-timesyncd.service(8) for details about this.
EXIT STATUS¶
On success, 0 is returned, a non-zero failure code otherwise.ENVIRONMENT¶
$SYSTEMD_PAGER$SYSTEMD_LESS
$SYSTEMD_LESSCHARSET
EXAMPLES¶
Show current settings:$ timedatectl Local time: Di 2015-04-07 16:26:56 CEST Universal time: Di 2015-04-07 14:26:56 UTC RTC time: Di 2015-04-07 14:26:56 Time zone: Europe/Berlin (CEST, +0200) Network time on: yes NTP synchronized: yes RTC in local TZ: no
Enable network time synchronization:
$ timedatectl set-ntp true ==== AUTHENTICATING FOR org.freedesktop.timedate1.set-ntp === Authentication is required to control whether network time synchronization shall be enabled. Authenticating as: user Password: ******** ==== AUTHENTICATION COMPLETE ===
$ systemctl status systemd-timesyncd.service ● systemd-timesyncd.service - Network Time Synchronization Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled) Active: active (running) since Mo 2015-03-30 14:20:38 CEST; 5s ago Docs: man:systemd-timesyncd.service(8) Main PID: 595 (systemd-timesyn) Status: "Using Time Server 216.239.38.15:123 (time4.google.com)." CGroup: /system.slice/systemd-timesyncd.service └─595 /lib/systemd/systemd-timesyncd ...
SEE ALSO¶
systemd(1), hwclock(8), date(1), localtime(5), systemctl(1), systemd-timedated.service(8), systemd-timesyncd.service(8), systemd-firstboot(1)systemd 232 |