Ubuntu如何同步网络时间

 

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

设定时区:dpkg-reconfigure tzdata工具

           选择Asia -> 再选择Shanghai -> OKspa

 

解决方法:code

1.安装ntpdate工具blog

sudo apt-get install ntpdate

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

ntpdate cn.pool.ntp.org

3.将时间写入硬件同步

hwclock --systohc

4.查看时间是否已同步class

date 
相关文章
相关标签/搜索