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

相关推荐
kfepiza9 小时前
Debian的`/etc/network/interfaces`的`allow-hotplug`和`auto`对比讲解 笔记250704
linux·服务器·网络·笔记·debian
susu108301891117 小时前
Debian 11 Bullseye 在线安装docker
运维·docker·debian
Winner130020 小时前
Debian、Buildroot 和 Ubuntu 都是基于 Linux 的系统区别
linux·ubuntu·debian
两斤半2 天前
Debian TTY环境乱码
linux·debian
翻滚吧键盘2 天前
debian及衍生发行版apt包管理常见操作
运维·debian
两斤半4 天前
debian杂项
debian
两斤半4 天前
Debian安装配置Nvidia驱动
debian
18你磊哥4 天前
Windows 本地安装部署 Apache Druid
运维·debian
kfepiza5 天前
Debian-10-standard用`networking`服务的`/etc/network/interfaces`配置文件设置多网卡多IPv6
linux·debian
longxibo16 天前
ZooKeeper 3.9.2 集群安装指南
大数据·分布式·zookeeper·debian