linux下如何查看某个网卡当前使用的IP


linux下如何查看某个网卡当前使用的IP

文章插图
打开终端,输入命令:
ifconfig -a
即可查看网卡对应的ip
eth0Link encap:EthernetHWaddr 84:2b:2b:ae:9d:7b
inet addr:192.168.1.102Bcast:192.168.1.255Mask:255.255.255.0
inet6 addr: fe80::862b:2bff:feae:9d7b/64 Scope:Link
UP BROADCAST RUNNING MULTICASTMTU:1500Metric:1
RX packets:25486 errors:0 dropped:0 overruns:0 frame:0
TX packets:25303 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:22536447 (21.4 MiB)TX bytes:4916282 (4.6 MiB)
Interrupt:21 Memory:f7ae0000-f7b00000
loLink encap:Local Loopback
inet addr:127.0.0.1Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNINGMTU:65536Metric:1
RX packets:60 errors:0 dropped:0 overruns:0 frame:0
TX packets:60 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4178 (4.0 KiB)TX bytes:4178 (4.0 KiB)
【linux下如何查看某个网卡当前使用的IP】wlan0 Link encap:EthernetHWaddr e4:d5:3d:96:6c:34
BROADCAST MULTICASTMTU:1500Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B)TX bytes:0 (0.0 B)

    推荐阅读