温馨提示×

debian怎么装ifconfig工具

小樊
45
2026-09-18 16:09:44
栏目: 智能运维

在 Debian 里,ifconfig 属于 net-tools 包,而新版 Debian 默认只装了 ip 命令(来自 iproute2)。

安装 ifconfig

sudo apt update
sudo apt install net-tools

安装完成后即可使用:

ifconfig

验证

which ifconfig

补充说明

  • Debian 10 及以后版本默认 不带 ifconfig
  • 官方推荐用:
    ip addr
    ip link
    ip route
    
    替代 ifconfig

如果你是 最小化安装(minimal / cloud image),通常都需要手动装 net-tools。

0 踩