-bash: ifconfig: command not found

Posted 超凡脫俗

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了-bash: ifconfig: command not found相关的知识,希望对你有一定的参考价值。

使用vmware 最小化安装centos7系统后,进入系统使用ifconfig命令报错“-bash: ifconfig: command not found,”尝试用yum install net-tools 也同样报错:
Loading mirror speeds from cached hostfile
There are no enabled repos.
Run “yum repolist all” to see the repos you have.
To enable Red Hat Subscription Management repositories:
subscription-manager repos --enable
To enable custom repositories:
yum-config-manager --enable

需要进入vim /etc/sysconfig/network-scripts/ifcfg-ens33修改文件,将ONBOOT=no改为yes,并且配置可以上网的IP,重启网络服务即可。
systemctl restart network #重启网络服务

以上是关于-bash: ifconfig: command not found的主要内容,如果未能解决你的问题,请参考以下文章

Centos7下ifconfig command not found 解决办法

CentOS下ifconfig出现“command not found”

CentOS7 ifconfig command not found

解决CentOS不能联网且ifconfig出现command not found

ifconfig: command not found 如何解决?

解决Centos 7不能联网且输入ifconfig出现command not found