Debian/Ubuntu/Raspbian 时间同步

时区设置

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

date -R

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

dpkg-reconfigure tzdata

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

调整时间

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

然后再次运行:

date

时间就是正确的。

原文地址:https://www.cnblogs.com/yikemogutou/p/12466138.html