← 返回命令列表

Linux command

chronyd 命令

文本

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

常用示例

Start chronyd

chronyd

Start in foreground

chronyd -d

Start with specific config file

chronyd -f [/etc/chrony.conf]

Check configuration syntax

chronyd -p

Run once

chronyd -q

说明

chronyd is the daemon component of chrony, a versatile implementation of the Network Time Protocol (NTP). It synchronizes the system clock with NTP servers, reference clocks, or manual input, and can serve time to other computers. chronyd is designed to work well in a wide range of conditions, including intermittent network connections, virtualized environments, and systems with unstable clocks. It can achieve faster and more accurate synchronization than traditional ntpd in many scenarios. The daemon maintains a drift file to track the system clock's frequency error, allowing it to correct time accurately even when network connectivity is lost.

参数

-d
Don't detach from terminal (foreground).
-f _file_
Use specified configuration file.
-n
Don't fork into background.
-p
Print configuration and exit.
-q
Set time once and exit.
-Q
Like -q but don't step clock.
-r
Reload sample histories on restart.
-R
Do not restore saved state.
-s
Set system time from RTC on startup.
-u _user_
Run as specified user.
-x
Don't control system clock.
-4
Use only IPv4.
-6
Use only IPv6.

FAQ

What is the chronyd command used for?

chronyd is the daemon component of chrony, a versatile implementation of the Network Time Protocol (NTP). It synchronizes the system clock with NTP servers, reference clocks, or manual input, and can serve time to other computers. chronyd is designed to work well in a wide range of conditions, including intermittent network connections, virtualized environments, and systems with unstable clocks. It can achieve faster and more accurate synchronization than traditional ntpd in many scenarios. The daemon maintains a drift file to track the system clock's frequency error, allowing it to correct time accurately even when network connectivity is lost.

How do I run a basic chronyd example?

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

What does -d do in chronyd?

Don't detach from terminal (foreground).