ifconfig
是一个用于配置和显示 Linux 内核中网络接口的命令行实用程序。它可以用来诊断网络连接问题,查看网络接口的状态,以及配置网络接口的参数。
以下是一些常用的 ifconfig
命令选项:
ifconfig
ifconfig eth0
ifconfig eth0 up
ifconfig eth0 down
ifconfig eth0 192.168.1.100
ifconfig eth0 0.0.0.0
ifconfig eth0 netmask 255.255.255.0
ifconfig eth0 broadcast 192.168.1.255
请注意,ifconfig
命令在某些 Linux 发行版中可能已被弃用,取而代之的是 ip
命令。尽管如此,ifconfig
仍然在许多系统中广泛使用。