在 Debian(以及大多数 Linux 发行版)中,ifconfig 属于 net-tools 软件包,并且通常已被 ip 命令取代。不过你仍然可以查看它的帮助信息。
ifconfig --help
或
ifconfig -h
(部分版本可能不支持 --help)
man ifconfig
如果提示 No manual entry for ifconfig,说明未安装 net-tools:
sudo apt update
sudo apt install net-tools
然后再执行:
man ifconfig
ifconfig
(不加参数会显示当前网络接口信息)
Debian 建议使用 ip 命令:
ip addr
ip link
ip -c addr # 彩色输出
查看帮助:
man ip
ip help
man ifconfig总结:man ifconfig 是最标准、最完整的查法,前提是先装好 net-tools。