Linux报错解决:ifconfig: command not found

Debian/Ubuntu 报错解决:ifconfig: command not found


 
本来想在Centos里查看ip状态,因此使用 ifconfig,结果发现出现下面的错误;

ERROR:

[root@localhost ~] #  ifconfig
-bash: ifconfig: command not found

解释:出现这个error是因为安装时没有基本工具包导致没有 ifconfig 命令,可以使用命令ip addr
1

※如果还想使用 ifconfig命令,则需要安装net-tools包:

  1. 对于Ubuntu则是sudo apt-get install net-tools
  2. 对于Centos则是sudo yum install net-tools

解释:CentOS的软件安装工具不是apt-get 而是yum。

发布了47 篇原创文章 · 获赞 20 · 访问量 6万+

猜你喜欢

转载自blog.csdn.net/qq_40520596/article/details/104723417