虚拟机ifconfig没有ip地址

在搭建好虚拟机之后使用命令 ifconfig没有ip地址,我是在虚拟机设置->网络使用的NAT模式

vi /etc/sysconfig/network-scripts/ifcfg-ens33
编辑此文件:修改启动网卡,ONBOOT=yes

sudo service network restart

ifconfig  就有了

猜你喜欢

转载自www.cnblogs.com/healthinfo/p/12296238.html