vmware中安装了contes--解决ifconfig无法执行

vmware中安装了contes,可是查看ip时,运行 ifconfig 命令报错:

ifconfig command not found

解决方案:

一、先解决联网的问题,编辑vi  /etc/sysconfig/network-scripts/ifcfg-ens33文件;

二、 ONBOOT=no 改为 ONBOOT=yes,然后保存退出;

 

三、重启网卡 service network restart

四、执行下ping  www.baidu.com查看是否能访问网络

五、执行以下命令

[root@localhost sbin]# sudo yum install net-tools

六、再次执行ifconfig,成功

原文地址:https://www.cnblogs.com/yitao326/p/11091696.html