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

相关推荐
小雉系统12 小时前
BcoreOS实战:用一个升级包,让Rocky Linux跑进Debian服务器
linux·运维·服务器·debian
谙弆悕博士16 小时前
debian快速换源
linux·运维·windows·debian·下载·换源·网络问题
木子欢儿4 天前
Debian 13 + vsftpd 搭建FTP服务
linux·服务器·前端·网络·debian
hqzing10 天前
在鸿蒙 PC 上使用 apt 安装 Debian 软件包(非虚拟机、非容器)
华为·debian·harmonyos
Strugglingler10 天前
debian打包干货
debian·deb
皓月盈江13 天前
Linux Debian下STM32CubeProgrammer串口连接失败解决方案
linux·stm32·debian·串口下载·stm32f103c8t6·usb转ttl·stm32cubepro
qetfw20 天前
Debian iptables 防火墙:默认拒绝、SNAT 与 DNAT 验证
linux·服务器·debian·php
qetfw22 天前
Debian SSH 安全配置:端口、来源限制与免密登录
linux·安全·debian·ssh
quweiie25 天前
debian13安装meson和libvips
debian·meson·libvips
qetfw1 个月前
Debian iSCSI Target 与 open-iscsi:LVM 后端、ACL 与客户端验证
linux·服务器·debian·php