# 安装 chrony
sudo apt update && sudo apt install -y chrony
# 禁用 systemd-timesyncd
sudo timedatectl set-ntp false
sudo systemctl stop systemd-timesyncd
sudo systemctl disable systemd-timesyncd
# vim /etc/chrony/chrony.conf
# 支持多 NTP 源
pool ntp.aliyun.com iburst
pool ntp.tencent.com iburst
# 启用 chrony
sudo systemctl enable chrony
sudo systemctl start chrony
# 查看时间配置
timedatectl status
# 请将 Asia/Shanghai 替换为你的目标时区
sudo timedatectl set-timezone Asia/Shanghai
# 再次查看
timedatectl status
Local time: 二 2026-03-17 13:12:43 CST # 本地时间(时间正确)
Universal time: 二 2026-03-17 05:12:43 UTC # UTC时间
RTC time: 二 2026-03-17 05:12:43 # 硬件时钟
Time zone: Asia/Shanghai (CST, +0800) # 时区正确(Asia/Shanghai)
System clock synchronized: yes # 时间已同步(NTP同步正确)
NTP service: active # NTP 服务运行正常
RTC in local TZ: no # 双系统才建议开启