树莓派实现开机自动同步网络时间

1 #安装NTP
2 sudo apt-get install ntpdate
3 #选择 上海时区
4 sudo dpkg-reconfigure tzdata

这里会出现界面,先选择亚洲,然后选择上海。

#同步时间
#添加到/etc/rc.local里面实现开机自启动
sudo ntpdate cn.pool.ntp.org
#查看当前时间
date
发布了50 篇原创文章 · 获赞 14 · 访问量 4643

猜你喜欢

转载自blog.csdn.net/qq_45467083/article/details/104044612