ntp同步系统时钟

主板时间有误,通过同步系统时钟,再写入主板时钟,整体修改。

1.查找ntp服务器,我这里用的是阿里云的:ntp1.aliyun.com

参考 https://www.cnblogs.com/qinyujie/p/7690844.html

2.ntpdate同步命令

$ sudo ntpdate -u ntp2.aliyun.com
27 Apr 12:31:30 ntpdate[3293]: step time server 120.25.115.19 offset -28759.247354 sec

一定要加 -u 参数,绕过防火墙,否则会出现

no server suitable for synchronization found

3.hwclock写入主板

$ sudo hwclock
2018-04-27 20:31:23.701080+0800
参考 https://blog.csdn.net/linuxnews/article/details/51336293

猜你喜欢

转载自blog.csdn.net/ftstic/article/details/80106387