ntp 命令用于在 [[Linux]] 中进行 NTP 同步。
查看
- 系统时钟:date
- 硬件时钟:hwclock
- NTP 同步地址:ntp servers
- 状态:systemctl status ntpq
- 时区:timedatectl
同步
- 系统时钟和 NTP 同步:
ntpd 地址 - 以系统时间为准,修改硬件时间:
hwclock --systohc - 以硬件时间为准,修改系统时间:
hwclock --hctosys - 启用 ntp:timedatectl set-ntp true
ntp 命令用于在 [[Linux]] 中进行 NTP 同步。
ntpd 地址hwclock --systohchwclock --hctosys