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

相关推荐
是店小二呀3 天前
画架构图不想依赖在线平台?把Excalidraw装进自己的NAS
人工智能·debian
七歌杜金房6 天前
我终于又有了自己的 Linux 电脑
linux·debian·mac
2601_9618752421 天前
决战申论100题2026|最新|范文
linux·容器·centos·debian·ssh·fabric·vagrant
AI帮小忙24 天前
Debian系linux操作系统里安装OpenClaw
linux·运维·debian
sxd20011 个月前
Debian #1135514 bug引发的思考
网络·debian·bug
一池秋_1 个月前
chroot-debian一键部署
android·容器·debian
来点抹茶吗1 个月前
U-Boot、内核移植与根文件系统构建(BeagleBone Green Gateway&AM335X)
linux·嵌入式硬件·ubuntu·debian
赵民勇1 个月前
Debian包systemd服务处理
debian
轻帆向远1 个月前
Debian 旧版源配置指南:国内镜像加速与 archive.debian.org 替代方案
网络·debian·apt
tianyuanwo1 个月前
Debian 系统 deb 仓库管理与配置完全指南
debian·deb