新安装的Centos虚拟机,ifconfig命令运行不了怎么解决?,centosifconfig
新安装的Centos虚拟机,ifconfig命令运行不了怎么解决?,centosifconfig
ifconfig command not found的问题
新下载的一个centos系统,并在vsbox中安装了,可是查看ip时,连 ifconfig 命令都运行不了。
怎么办,运行这段命令:
[root@localhost sbin]# sudo yum install net-tools
如果无法联网,这条命令也是运行不了的。
不能联网的问题
先解决联网的问题,找到/etc/sysconfig/network-scripts/ifcfg-enp0s3文件,进入编辑:
进入编辑模式,将 ONBOOT=no 改为 ONBOOT=yes,就OK。当然,你还得保存后重启网卡:
service network restart
检查是否联网,可以使用ping www.baidu.com 试试!
此时就可以上网了。这样yum,wget等等都可以用啦!
评论暂时关闭