Ubuntu ifconfig查看网卡信息 lo enp2s0 wlp3s0 具体含义

45 篇文章 3 订阅

涵义

如何通过命令查看本机IP?
Windows:ipconfig /a
Linux:ifconfigiwconfig
我会查看到3个项目:
lo
wlp3s0
enp2s0
挨个解析:

  • lo表示local
  • wl表示wlan(Wireless Local Area Network)无线局域网
  • en表示ethernet以太网
  • PCI接口的物理位置的坐标(bus, slot),其中bus表示总线,slot表示插槽。

再看:

  • wlp3s0表示,WLAN PCI接口位置:bus=3, slot=0。
  • enp2s0表示,Etnernet PCI接口位置:bus=2, slot=0。

PCI 外设部件互连标准(Peripheral Component Interconnect)

shell操作

wuyujin@ubuntu18:~$ ifconfig
enp2s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether [xxx]  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        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  (Local Loopback)
        RX packets 16285  bytes 1914437 (1.9 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 16285  bytes 1914437 (1.9 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet [IP地址]  netmask [网关地址]  broadcast [子网掩码]
        inet6 [IPV6]  prefixlen 64  scopeid 0x20<link>
        ether [xxx]  txqueuelen 1000  (Ethernet)
        RX packets 926526  bytes 1261489274 (1.2 GB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 377109  bytes 50598690 (50.5 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wuyujin@ubuntu18:~$ 

Others

wuyujin@ubuntu18:~$ whatis ifconfig
ifconfig (8)         - configure a network interface
wuyujin@ubuntu18:~$ whatis iwconfig
iwconfig (8)         - configure a wireless network interface
wuyujin@ubuntu18:~$ 

ifconfig 用于配置网络接口 InterFace config
iwconfig 用于配置无线网络接口 Interface Wlan config

  • 20
    点赞
  • 55
    收藏
    觉得还不错? 一键收藏
  • 4
    评论
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值