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

相关推荐
aq55356007 小时前
Laravel5.X核心特性全解析
ubuntu·debian
aq55356002 天前
CentOS vs Debian:如何选择最适合的Linux发行版
linux·centos·debian
羌俊恩14 天前
统信UOS存在elfverify绕过漏洞
debian·grub·uos v20·内核升级·deb包
污斑兔21 天前
Debian 普通用户无 sudo 权限问题排查与解决
运维·debian
tobebetter952724 天前
Debian / Ubuntu openclaw 浏览器自动化
ubuntu·自动化·debian
allway21 个月前
Debian Regular Expressions
运维·debian·scala
brucelee1861 个月前
Debian 安装 Ollama 教程
debian·ollama·open claw
AiGuoHou11 个月前
Debian/Ubuntu 各个版本一键更换国内镜像源
linux·ubuntu·国内源·debian·镜像源·换源
木子欢儿1 个月前
在 Debian 12 上安装多个版本的 php(7.3、7.4、8.1、8.2)
运维·开发语言·debian·php
無法複制1 个月前
debian安装Postgresql-14.x
运维·postgresql·debian