ifconfig -a
生成:
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:1812 errors:0 dropped:0 overruns:0 frame:0
TX packets:1812 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:209274 (209.2 KB) TX bytes:209274 (209.2 KB)
wlan0 Link encap:Ethernet HWaddr 28:cf:e9:1a:43:cd
inet addr:192.168.12.11 Bcast:192.168.12.255 Mask:255.255.255.0
inet6 addr: fe80::2acf:e9ff:fe1a:43cd/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:11512 errors:0 dropped:0 overruns:0 frame:0
TX packets:11320 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:9240182 (9.2 MB) TX bytes:2316647 (2.3 MB)
lspci -nn | grep Ethernet
生成:
03:00.0 Ethernet controller [0200]: Broadcom Corporation Device [14e4:16a3] (rev 10)
cat /etc/network/interfaces
生成:
auto lo
iface lo inet loopback
关于如何获取 eth0 有什么想法吗?谢谢!
答案1
eth0
通过输入来检查您的接口是否有名称ifconfig -a
。
可能它被命名为类似p1p1
now 的名称。如果是,并且您希望它被命名为eth0
,请将其添加biosdevname=0
到 中的启动选项中/etc/default/grub
。