IT源码网

同步时间

itxm 2021年02月10日 程序员 431 0

检查

timedatectl status <此为systemd命令>

 更改ntp配置

sudo vim /etc/ntp.conf

#更改ntp服务器
server 0.cn.pool.ntp.org server 1.cn.pool.ntp.org server 2.cn.pool.ntp.org server 3.cn.pool.ntp.org

立即同步

ntpd -qg

写入硬件时钟

hwclock -w

启动时启用ntpd服务

systemctl enable ntpd

评论关闭
IT源码网

微信公众号号:IT虾米 (左侧二维码扫一扫)欢迎添加!