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

相关推荐
爱的si念2 天前
嵌入式ARM64 基于RK3588原生SDK添加用户配置选项./build lunch & debian
linux·debian·嵌入式
蚂蚁舞2 天前
在arm架构的Debian系统手动安装和卸载Mysql8的操作
arm开发·debian·安装mysql·mysql8·卸载mysql
圆山猫2 天前
[VF2] Boot Ubuntu和Debian发行版
ubuntu·postgresql·debian
etcix2 天前
for my debian 12 mxlinux install the podman
运维·debian·podman
Jtti4 天前
在 Debian 系统上清理缓存的方式和具体操作方法
运维·缓存·debian
Molesidy6 天前
【随笔】【Debian】【ArchLinux】基于Debian和ArchLinux的ISO镜像和虚拟机VM的系统镜像获取安装
运维·debian·archlinux
程序员 _孜然16 天前
Ubuntu/Debian修改网卡名字enP3p49s0为eth0
linux·运维·驱动开发·嵌入式硬件·ubuntu·debian
Gavin_91519 天前
从零开始部署经典开源项目管理系统最新版redmine6-Linux Debian12
linux·ruby on rails·开源·debian·ruby·redmine
天朝八阿哥19 天前
Debian从12升到13的翻车记
debian
闻道且行之22 天前
嵌入式|VNC实现开发板远程Debian桌面
运维·debian·嵌入式