CentOS 7.6 最小安装 ifconfig command not found 及 yum 不可用的解决办法

 问题描述

下载的是 CentOS 7.6 Everything 版本,在 VMware 12 上安装时软件选择“最小安装”后,输入 ifconfig 命令提示:

bash ifconfig command not found

经搜索得知是由于没有安装 net-tools 工具的原因,于是使用 yum 命令安装,结果发现 yum 不可用。

再次搜索,才知道网卡配置没有开启。

 解决方法

ip addr

  查看网卡名称,第2个即是,我的网卡名称是 ens33

vi etc/sysconfig/network-scripts/ens33

  修改网卡配置文件,将 ONBOOT=no 改为 yes 后保存

service network restart

  重启网络(或者 reboot 重启系统)

yum upgrade

yum install net-tools

这样,问题就解决了。如果还没有,继续搜吧...

 参考资料

https://dotblogs.com.tw/grayyin/2018/08/23/135617

https://blog.csdn.net/TransientJoy/article/details/79353332

猜你喜欢

转载自www.cnblogs.com/walixz/p/10349651.html
今日推荐