美文网首页
ubuntu时间同步

ubuntu时间同步

作者: 哆啦A梦_ca52 | 来源:发表于2020-06-16 14:11 被阅读0次
装完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 


查看日期后,输入修改日期命令:date -s 2019-5-20。
需要修改时间时,输入命令:date -s 09:25:30。



相关文章

网友评论

      本文标题:ubuntu时间同步

      本文链接:https://www.haomeiwen.com/subject/mzzlxktx.html