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作用相同

相关推荐
木子欢儿8 小时前
Debian 13安装rime中文输入法
linux·运维·服务器·debian
dllmayday10 小时前
AppImage打包
debian
水木姚姚3 天前
搭建 TensorFlow 在 VScode 下编程环境(Debian)
人工智能·windows·vscode·debian·tensorflow
wadesir3 天前
Debian dd命令详解(磁盘备份与恢复完整教程)
linux·运维·debian
云空4 天前
《Debian 系统上部署 YOLO11》
人工智能·神经网络·yolo·debian
李李李li4 天前
debian系统打包(live build)
debian·live build
无名3875 天前
FusionPBX Debian 12 安装
运维·debian·通信
fiveym6 天前
PXE 装机引导文件提取与验证(Debian 9.13 适配,含 TFTP 传输测试)
运维·debian
wadesir7 天前
Debian容器存储管理(Docker中实现数据持久化的完整指南)
运维·docker·debian
一个平凡而乐于分享的小比特8 天前
Linux、Debian、Yocto、Buildroot、Android系统详解
android·linux·操作系统·debian·yocto·buildroot