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

猜你喜欢

转载自blog.csdn.net/m0_37664730/article/details/88174819