在ubuntu18.04中ifconfig,出现如下信息:
enp7s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.9 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 2409:8a4c:1ac5:9f70:da0f:a987:3aca:7a20 prefixlen 64 scopeid 0x0<global>
inet6 2409:8a4c:1ac5:9f70:e181:b6ab:789f:fa06 prefixlen 64 scopeid 0x0<global>
inet6 fe80::a970:782a:c490:22ff prefixlen 64 scopeid 0x20<link>
ether f8:75:a4:31:35:fe txqueuelen 1000 (以太网)
RX packets 4057 bytes 1691974 (1.6 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 3725 bytes 633280 (633.2 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (本地环回)
RX packets 3719 bytes 363866 (363.8 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 3719 bytes 363866 (363.8 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlp0s20f3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.7 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::f855:f20f:fea6:af22 prefixlen 64 scopeid 0x20<link>
inet6 2409:8a4c:1ac5:9f70:e4a5:d055:7257:f92b prefixlen 64 scopeid 0x0<global>
inet6 2409:8a4c:1ac5:9f70:a0a5:72c1:f9fc:75c3 prefixlen 64 scopeid 0x0<global>
ether c8:09:a8:78:b4:a0 txqueuelen 1000 (以太网)
RX packets 24915 bytes 20625674 (20.6 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 16831 bytes 3075224 (3.0 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
第一部分是本机的第一块网卡(有线)相关信息,第三段是第二块网卡(无线)信息。拔掉网线或者关掉wifi,则只显示剩余的显卡信息。