centos7 minimal 虚拟机 配置网络

1. 环境

win10 + VMware14
centos7 minimal

2. 过程

lz想装个centos minimal 来玩玩,结果发现装完虚拟机竟然没有网络,用 ifconfig 还看不了,因为没有这条命令。发现ip address 也可以看网络的一些信息。
正常的虚拟机装完后用主机模式是可以上网的,但是centos minimal 不行,原因是没有开启网卡。
现在开始启动网卡

  1. 修改/etc/sysconfig/network-script/网卡配置文件 (这里看你的网卡,很有可能不是eth0,lz的就是ifcfg-ens33 vi /etc/sysconfig/network-script/ifcfg-ens33
    这里写图片描述
  2. 修改配置,将onboot=no 改成yes
    这里写图片描述
  3. 重启一下网卡 /etc/init.d/network restart
    这里写图片描述
  4. 查看ip ip address
    这里写图片描述
  5. ping baidu.com
    这里写图片描述
    可以上网了

猜你喜欢

转载自blog.csdn.net/qq_37933685/article/details/81169794