← 返回命令列表

Linux command

timedatectl 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Example

timedatectl

Example

timedatectl set-time "2024-01-15 14:30:00"

Example

timedatectl list-timezones

Example

timedatectl set-timezone America/New_York

Example

timedatectl set-ntp on

Example

timedatectl set-local-rtc 1

说明

timedatectl queries and changes the system clock and its settings. It controls the system time, timezone, and network time synchronization through systemd-timedated.

参数

--no-pager
Do not pipe output into a pager
--no-ask-password
Do not prompt for password
-H, --host
Execute operation on remote host
-M, --machine
Execute operation on container
-p, --property
Show specific property
--value
Show only property values

FAQ

What is the timedatectl command used for?

timedatectl queries and changes the system clock and its settings. It controls the system time, timezone, and network time synchronization through systemd-timedated.

How do I run a basic timedatectl example?

Run `timedatectl` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --no-pager do in timedatectl?

Do not pipe output into a pager