• BBB网络连接更新时间


    BBB通过USB连接互联网的设置:

    root@beaglebone:~# /sbin/route add default gw 192.168.7.1
    root@beaglebone:~# ping 8.8.8.8
    PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
    64 bytes from 8.8.8.8: icmp_req=1 ttl=43 time=207 ms
    64 bytes from 8.8.8.8: icmp_req=2 ttl=43 time=210 ms
    64 bytes from 8.8.8.8: icmp_req=3 ttl=44 time=203 ms
    ^C
    --- 8.8.8.8 ping statistics ---
    3 packets transmitted, 3 received, 0% packet loss, time 2002ms
    rtt min/avg/max/mdev = 203.514/206.953/210.227/2.743 ms
    root@beaglebone:~#

    设置网关,此步骤在BBB重启后消失。

    可以修改下面文件.profile来实现永久性修改:

    root@beaglebone:~# vi .profile
    # ~/.profile: executed by Bourne-compatible login shells.
    
    if [ "$BASH" ]; then
      if [ -f ~/.bashrc ]; then
        . ~/.bashrc
      fi
    fi
    
    mesg n
    /sbin/route add default gw 192.168.7.1
    ~
    ~
    ".profile" 10L, 179C                                          1,1           All

     更新时间:

    root@beaglebone:~# date
    Wed Apr 23 20:47:21 UTC 2014
    root@beaglebone:~# /usr/sbin/ntpdate -b -s -u cn.pool.ntp.org
    root@beaglebone:~# date
    Wed May 22 01:42:41 UTC 2019

    与实际时间差8小时,这是由于时区设置导致。

    设置时区为上海:

    root@beaglebone:~# cat /etc/localtime
    TZif2UTCTZif2UTC
    UTC0
    root@beaglebone:~# ls /usr/share/zoneinfo/Asia/
    Aden       Choibalsan   Irkutsk       Kuwait        Qyzylorda  Tokyo
    Almaty     Chongqing    Istanbul      Macao         Rangoon    Ujung_Pandang
    Amman      Chungking    Jakarta       Macau         Riyadh     Ulaanbaatar
    Anadyr     Colombo      Jayapura      Magadan       Saigon     Ulan_Bator
    Aqtau      Dacca        Jerusalem     Makassar      Sakhalin   Urumqi
    Aqtobe     Damascus     Kabul         Manila        Samarkand  Ust-Nera
    Ashgabat   Dhaka        Kamchatka     Muscat        Seoul      Vientiane
    Ashkhabad  Dili         Karachi       Nicosia       Shanghai   Vladivostok
    Baghdad    Dubai        Kashgar       Novokuznetsk  Singapore  Yakutsk
    Bahrain    Dushanbe     Kathmandu     Novosibirsk   Taipei     Yekaterinburg
    Baku       Gaza         Katmandu      Omsk          Tashkent   Yerevan
    Bangkok    Harbin       Khandyga      Oral          Tbilisi
    Beirut     Hebron       Kolkata       Phnom_Penh    Tehran
    Bishkek    Ho_Chi_Minh  Krasnoyarsk   Pontianak     Tel_Aviv
    Brunei     Hong_Kong    Kuala_Lumpur  Pyongyang     Thimbu
    Calcutta   Hovd         Kuching       Qatar         Thimphu
    root@beaglebone:~# cp /usr/share/zoneinfo/Asia/Shanghai /etc
    root@beaglebone:~# rm /etc/localtime
    root@beaglebone:~# ls /etc/Sh*
    /etc/Shanghai
    root@beaglebone:~# cd /etc/
    root@beaglebone:/etc# mv Shanghai localtime
    root@beaglebone:/etc# ls -l loc*
    -rw-r--r-- 1 root root 2570 Dec 23  2013 locale.alias
    -rw-r--r-- 1 root root 8554 Aug 14  2014 locale.gen
    -rw-r--r-- 1 root root  405 May 22 13:37 localtime
    root@beaglebone:/etc# cd ..
    root@beaglebone:/# date
    Wed May 22 13:41:08 CST 2019
    root@beaglebone:/#

    设置完成。

  • 相关阅读:
    在jQuery中.bind() .live() .delegate() .on()的区别
    jquery小结测试题
    揭秘子类构造函数执行过程
    过滤器
    实现AJAX的基本步骤
    AJAX 原生态
    java工程师需要学什么
    Java进阶之路
    git入门大全
    轻松学JVM
  • 原文地址:https://www.cnblogs.com/Joezhang433/p/10904974.html
Copyright © 2020-2023  润新知