Raspberry Pi achieve power on automatically synchronized network time

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

Here screen will appear, first select Asia, and then select Shanghai.

#同步时间
#添加到/etc/rc.local里面实现开机自启动
sudo ntpdate cn.pool.ntp.org
#查看当前时间
date
Published 50 original articles · won praise 14 · views 4643

Guess you like

Origin blog.csdn.net/qq_45467083/article/details/104044612