码迷,mamicode.com
首页 > 系统相关 > 详细

Ubuntu如何同步网络时间

时间:2018-07-11 15:10:42      阅读:245      评论:0      收藏:0      [点我收藏+]

标签:col   设置   lock   方法   pkg   ubuntu   ntpd   同步   shanghai   

 

装完Ubuntu设置完时间,重启总是恢复设置前的时间。

设定时区:dpkg-reconfigure tzdata

           选择Asia -> 再选择Shanghai -> OK

 

解决方法:

1.安装ntpdate工具

sudo apt-get install ntpdate

2.将系统时间与网络同步

ntpdate cn.pool.ntp.org

3.将时间写入硬件

hwclock --systohc

4.查看时间是否已同步

date 

 

Ubuntu如何同步网络时间

标签:col   设置   lock   方法   pkg   ubuntu   ntpd   同步   shanghai   

原文地址:https://www.cnblogs.com/zhongguiyao/p/9293764.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!