“以太网口测试”的版本间的差异
第18行: | 第18行: | ||
orangepi@orangepi:~$ '''ifconfig'''<br> | orangepi@orangepi:~$ '''ifconfig'''<br> | ||
Command 'ifconfig' is available in the following places<br> | Command 'ifconfig' is available in the following places<br> | ||
− | /sbin/ifconfig<br> | + | <span></span> */sbin/ifconfig<br> |
− | /usr/sbin/ifconfig<br> | + | <span></span> */usr/sbin/ifconfig<br> |
The command could not be located because '/sbin:/usr/sbin' is not included in the PATH environment variable.<br> | The command could not be located because '/sbin:/usr/sbin' is not included in the PATH environment variable.<br> | ||
This is most likely caused by the lack of administrative privileges associated with your user account.<br> | This is most likely caused by the lack of administrative privileges associated with your user account.<br> |
2023年4月24日 (一) 19:42的最新版本
1) 首先将网线的一端插入开发板的以太网接口,网线的另一端接入路由器,并确保网络是畅通的
2) 系统启动后会通过 DHCP 自动给以太网卡分配 IP 地址,不需要其他任何配置
3) 在开发板的 Linux 系统中查看 IP 地址的命令如下所示
orangepi@orangepi:~$ ip addr show eth0 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
|
当使用 ifconfig 查看 IP 地址时,如果提示下面的信息,是因为没有加 sudo 导致的,正确的命令是:sudo ifconfig orangepi@orangepi:~$ ifconfig |
开发板启动后查看 IP 地址有三种方法: 1. 接 HDMI 显示器,然后登录系统使用 ip addr show eth0 命令查看 IP 地址 |
4) 测试网络连通性的命令如下,ping 命令可以通过 Ctrl+C 快捷键来中断运行
orangepi@orangepi:~$ ping www.baidu.com -I eth0 PING www.a.shifen.com (14.215.177.38) from 192.168.1.12 eth0: 56(84) bytes of data. |