ifconfig
是一個用于配置和顯示網絡接口參數的命令行工具。在 Linux 和類 Unix 系統中,使用 ifconfig
可以查看和管理網絡接口(如以太網、無線網絡等)的配置信息。以下是 ifconfig
輸出中常見的一些信息及其含義:
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.100 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::a00:27ff:fe4e:66a1 prefixlen 64 scopeid 0x20<link>
ether 08:00:27:4e:66:a1 txqueuelen 1000 (Ethernet)
RX packets 123456 bytes 123456789 (117.7 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 654321 bytes 987654321 (941.5 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
ifconfig
在某些現代 Linux 發行版中可能已被 ip
命令取代,但仍然廣泛使用。通過理解這些信息,你可以更好地管理和診斷網絡接口的問題。