首页 > 技术文章 > Debian/Ubuntu/Raspbian 时间同步

yikemogutou 2020-03-11 22:42 原文

时区设置

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

date -R

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

dpkg-reconfigure tzdata

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

调整时间

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

然后再次运行:

date

时间就是正确的。

推荐阅读