centos 7 更新yum为阿里云源下载,解决ipconfig命令经常提示不存在问题
备份当前系统默认 yum
源配置文件
[[email protected] ~]# mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
查看当前 CentOS7
版本号
[[email protected] ~]# cat /etc/centos-release
到阿里云开源镜像站找到对应的 yum
源版本,详情参考: 阿里yum源 网易yum源
[[email protected] ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
清除所有yum源缓存文件
[[email protected] ~]# yum clean all
生成yum源缓存
[[email protected] ~]# yum makecache
现在的话你就可以通过:
[[email protected] ~]# yum whatprovides ifconfig
[[email protected] ~]# yum install -y net-tools
使用 ifconfig
查看网卡配置信息
[[email protected] ~]# ifconfig