1.配置网卡

2.修改配置文件
root@localhost etc]# vi /etc/sysconfig/network-scripts/ifcfg-enp0s3
(我这里使用的root账户,如果不是,请使用sudo执行)
按i进入编辑模式,修改如下

输入 :wq 保存退出
重启网络
[root@localhost etc]# service network restart
3.查看
ip addr
1.配置网卡
2.修改配置文件
root@localhost etc]# vi /etc/sysconfig/network-scripts/ifcfg-enp0s3
(我这里使用的root账户,如果不是,请使用sudo执行)
按i进入编辑模式,修改如下
输入 :wq 保存退出
重启网络
[root@localhost etc]# service network restart
3.查看
ip addr
本文标题:VirtualBox中CentOS-7无法访问网络
本文链接:https://www.haomeiwen.com/subject/reikbftx.html
网友评论