天天看点

Centos7 报错:-bash ifconfig command not found

安装centos7虚拟机

 cd /sbin
           

查看一下是否有 ifconfig

没有 ifconfig 的话安装 net-tools package

yum install net-tools
           

报错:Cannot find a valid baseurl for repo: base/7/x86_6

ip addr找到你得网卡名称

vi /etc/sysconfig/network-scripts/ifcfg-网卡名称
           

ONBOT=no,改为ONBOT=yes

重启网络:

service network restart
           
重新执行:      
yum install net-tools
           

继续阅读