安装完虚拟机之后 ifconfig 发现没有ip地址

178 阅读1分钟
  1. 执行命令:
cd /etc/sysconfig/network-scripts/
vi ifcfg-eth*

把ONBOOT改成yes

保存 :  wq
  1. 执行 :
service network restart
  1. ifconfig看看是否有ip了