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

相关推荐
ReaF_star8 小时前
【基线】关于Debian的一些简单安全配置及验证
学习·安全·debian
沟通QQ192263815 小时前
探索数字编码超表面:多模式复用与多功能实现
debian
木子欢儿2 天前
Debian 13安装rime中文输入法
linux·运维·服务器·debian
dllmayday2 天前
AppImage打包
debian
水木姚姚6 天前
搭建 TensorFlow 在 VScode 下编程环境(Debian)
人工智能·windows·vscode·debian·tensorflow
wadesir6 天前
Debian dd命令详解(磁盘备份与恢复完整教程)
linux·运维·debian
云空7 天前
《Debian 系统上部署 YOLO11》
人工智能·神经网络·yolo·debian
李李李li7 天前
debian系统打包(live build)
debian·live build
无名3877 天前
FusionPBX Debian 12 安装
运维·debian·通信
fiveym8 天前
PXE 装机引导文件提取与验证(Debian 9.13 适配,含 TFTP 传输测试)
运维·debian