解决Centos7不能联网且ifconfig出现command not found
2016-08-10 17:36
453 查看
在虚拟机中以最小化方式安装centos7,后无法上网,因为centos7默认网卡未激活。
而且在sbin目录中没有ifconfig文件,这是因为centos7已经不使用 ifconfig命令了,已经用ip命令代替;
并且网卡名称也不是eth0了,而是改成eno16777736了。
解决ifconfig不可用:ip addr 即查看分配网卡情况。
激活网卡:在文件 /etc/sysconfig/network-scripts/ifcfg-enp0s3 中
进入编辑模式,将 ONBOOT=no 改为 ONBOOT=yes,就OK
保存后重启网卡: service network restart
此时就可以上网了。(如果不知怎样判断能否上网,ping 一下网址就可以,就是这么简单,例如命令:ping www.baidu.com)
这样yum,wget等等都可以用啦
本文出自“筱Mary”博客,转载请务必保留此处 http://blog.csdn.net/qq_31382921/article/details/52174626
而且在sbin目录中没有ifconfig文件,这是因为centos7已经不使用 ifconfig命令了,已经用ip命令代替;
并且网卡名称也不是eth0了,而是改成eno16777736了。
解决ifconfig不可用:ip addr 即查看分配网卡情况。
激活网卡:在文件 /etc/sysconfig/network-scripts/ifcfg-enp0s3 中
进入编辑模式,将 ONBOOT=no 改为 ONBOOT=yes,就OK
保存后重启网卡: service network restart
此时就可以上网了。(如果不知怎样判断能否上网,ping 一下网址就可以,就是这么简单,例如命令:ping www.baidu.com)
这样yum,wget等等都可以用啦
本文出自“筱Mary”博客,转载请务必保留此处 http://blog.csdn.net/qq_31382921/article/details/52174626
相关文章推荐
- 解决Centos7不能联网且ifconfig出现command not found
- 解决CentOS不能联网且ifconfig出现command not found
- 解决Centos 7不能联网且输入ifconfig出现command not found
- 解决Centos7不能联网且ifconfig出现command not found
- ifconfig出现command not found解决办法
- centos7刚安装完 ifconfig 出现command not found,ping不通
- 【转】CentOS出现ifconfig: command not found的解决办法
- centos7 最小化安装ifconfig提示command not found解决方法
- CentOS7下解决ifconfig command not found的办法
- red hat 输入ifconfig bash: ifconfig: command not found的解决办法
- 虚拟机linux环境下编译程序时出现 bash:gcc:command not found的解决
- 【Linux】Linux下输入ifconfig提示bash: ifconfig: command not found解决办法
- bash: ifconfig: command not found 解决办法
- mac Terminal出现command not found的解决办法
- 解决Ubuntu编译内核uImage出现问题“mkimage” command not found - U-Boot images will not be built问题
- bash: ifconfig: command not found 解决办法
- linux 输入ifconfig命令报错:“ifconfig: command not found” 其他命令类似这种解决方法
- Centos安装webbench时出现/bin/sh: ctags: command not found解决方法
- bash: ifconfig: command not found 解决办法
- mac下终端出现command not found现象解决