注意:以下方法在树莓派3B+ raspbian系统不适用。
树莓派没有ntp.conf
添加一些国内可用的ntp服务器
打开ntp服务的配置文件
sudo nano /etc/ntp.conf
找到这两行
# You do need to talk to an NTP server or two (or three)
# server ntp.your-provider.example
在下面添加以下内容,是一些亲测可用的ntp服务器。第一行最后的prefer表示优先使用此服务器,也就是复旦大学的ntp服务器。添加之后按Ctrl+X保存退出。
server ntp.fudan.edu.cn iburst prefer
server time.asia.apple.com iburst
server asia.pool.ntp.org iburst
server ntp.nict.jp iburst
server time.nist.gov iburst
重启ntp服务
sudo /etc/init.d/ntp restart
树莓派日期时间校准
最新推荐文章于 2023-10-24 17:05:47 发布