Debian/Ubuntu/Raspbian 时间同步

时区设置

先使用如下命令查看自己系统设置的时区

date -R

如果输出的不是+8000,那么需要调整时区:

dpkg-reconfigure tzdata

选择asia,中国的城市即可。

调整时间

apt-get install ntpdate
ntpdate ntp.sjtu.edu.cn

然后再次运行:

date

时间就是正确的。

posted @ 2020-03-11 22:42  一颗蘑菇头  阅读(236)  评论(0编辑  收藏  举报