ifconfig
是一个用于配置和显示 Linux 内核中网络接口的命令行实用程序。在 Debian 系统中,你可以使用许多高级选项来管理和诊断网络接口。以下是一些常用的高级用法:
ifconfig -a
ifconfig -v
sudo ifconfig eth0 up
sudo ifconfig eth0 down
sudo ifconfig eth0 192.168.1.100 netmask 255.255.255.0
sudo ifconfig eth0 release
sudo ifconfig eth0 mtu 1500
ifconfig eth0 broadcast
sudo ifconfig eth0 promisc
sudo ifconfig eth0 -promisc
sudo ifconfig eth0 hw ether 00:11:22:33:44:55
请注意,ifconfig
命令在某些 Debian 版本中可能已被弃用,建议使用 ip
命令替代。你可以使用 man ifconfig
查看更多关于 ifconfig
的信息。