把树莓派的时间调节到北京时间

来源:互联网 发布:淘宝的美工教学视频 编辑:程序博客网 时间:2024/06/01 09:51

       把树莓派时间调节到北京时间, 简单:

      1.  安装ntp

sudo apt-get install ntpdate
      2.  然后根据提示, 一路根据提示进行选择即可:

tzselect
      要稍微留意一下这个提示:

You can make this change permanent for yourself by appending the line        TZ='Asia/Shanghai'; export TZto the file '.profile' in your home directory; then log out and log in again.

      3.  用date命令试下, 则source一下, 生效:

pi@raspberrypi:~ $ dateSun 26 Nov 13:37:52 CST 2017
       

       吃饭。


原创粉丝点击