Debian系统终端输入ifconfig报错

报错

bash: ifconfig: command not found

原因

Debian 上默认不安装 ifconfig 软件包。这是因为 ifconfig 已被弃用,取而代之的是新的 ip 命令。该 ip 命令现在负责修改或显示路由、网络设备、接口和隧道

如果仍然想使用旧的 ifconfig 命令,则必须显式安装它。

解决方案

安装net-tools套件

cpp 复制代码
sudo apt install net-tools

可能遇到的问题

用户没有权限

可能的一种解决方案:Linux下 <用户名> is not in the sudoers file-CSDN博客

安装之后可以使用命令

cpp 复制代码
sudo ifconfig

使用iproute2套件

参考链接:https://blog.csdn.net/yimaoya/article/details/125341754

cpp 复制代码
ip addr

该命令和ifconfig作用相同

相关推荐
周杰伦的稻香6 天前
Debian 9 (Stretch)仓库无法使用
运维·debian
MaoSource6 天前
Debian 12 安装 FFmpeg 命令
服务器·ffmpeg·debian
weixin_462446237 天前
一键安装单节点 Zookeeper 3.8.5(附完整 Bash 脚本)
zookeeper·debian·bash
胖好白7 天前
【RK3588开发】Debian系统的驱动开发配置
驱动开发·debian
网硕互联的小客服10 天前
Debian系统提示“Media change...”如何处理?
运维·debian
shhpeng11 天前
Debian packages 的签名与验证
运维·debian
shhpeng11 天前
Debian 包的制作与安装完整指南
运维·debian
shhpeng11 天前
如何制作一个简单的 .deb Debian 包 ?
运维·debian
weixin_4307509312 天前
OpenMediaVault debian Linux安装配置企业私有网盘(三) 静态ip地址配置
linux·服务器·debian·nas·网络存储系统
零意@12 天前
debian如何把新编译的内核镜像替换原来的内核
运维·debian·更新内核版本·linux内核版本更新·debian更新内核