天天看点

CentOS7 ifconfig执行失败(command not found)

参考:

CentOS7 yum 出现 “could not retrieve mirrorlist“ 以及 CENTOS7 IFCONFIG命令找不到

【转载】Linux中找不到ifconfig命令的解决方法

安装ifconfig

通过

yum search ifconfig

这个命令我们发现ifconfig这个命令是在net-tools.x86_64这个包里,接下来只要yum install net-tools.x86_64安装这个包就行了

问题解决

yum search ifconfig 依旧报错“could not retrieve mirrorlist”

  1. 修改DNS解析

    vim /etc/resolv.conf

    (设置成114也行)

    nameserver 8.8.8.8

    search localdomain

  2. 配置

    vim /etc/sysconfig/network-scripts/ifcfg-ens33

    将ONBOOT=no 改成YES

    最后一行加上 DNS1=192.168.10.2

    CentOS7 ifconfig执行失败(command not found)

继续阅读