Ubuntu操作系统 ifconfig/iwconfig 命令 查看网卡信息各项的具体含义
1、查看本机IP地址的命令:
Windows操作系统: ipconfig /a
Linux操作系统: ifconfig 或者 iwconfig
2、
iwconfig 命令:
ifconfig 命令:
可以通过命令行窗口执行结果看到有三个项目:
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))
3、
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
4、
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:~$
参考博客:https://blog.csdn.net/wuyujin1997/article/details/105460929
去期待陌生,去拥抱惊喜。
分类:
Linux操作系统
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!