温馨提示×

debian ifconfig如何安装

小樊
49
2026-09-06 16:04:54
栏目: 智能运维

在 Debian 里,ifconfig 属于 net-tools 工具包,而新版本的 Debian 默认只装了 ip 命令,所以 ifconfig 需要手动安装。

安装 ifconfig

sudo apt update
sudo apt install net-tools

安装完成后即可使用:

ifconfig

补充说明

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

如果你是在 最小化安装(minimal / cloud image) 的 Debian 上,通常一定是没装 net-tools 的。

需要我教你用 ip 命令替代常见 ifconfig 用法也可以。

0 踩