linux虚拟机连不上网络

1.修改文件ifcfg-ens33

# 切换目录
[root@localhost ~]# cd /etc/sysconfig/network-scripts/

# 将ONBOOT修改为yes
[root@localhost network-scripts]# vi ifcfg-ens33

ONBOOT=yes

2.修改文件selinux

# 切换目录
[root@localhost ~]# cd /etc/sysconfig

# 将SELINUX修改为disabled
[root@localhost sysconfig]# vi selinux

SELINUX=disabled

3.重启网络服务

[root@localhost ~]# systemctl restart network

4.如果还不行

然后关机,重启,一定没有问题了!

还不行。。。

底下留言

原文地址:https://www.cnblogs.com/apollo1616/p/10412828.html