虚拟机设置为桥接模式,windows下VMware Network Adapter VMnet1和8自动获取IP即可,不需要手动更改(NAT模式可能需要更改吧) 手动设置IP(IP和主机在同一网段) sudo vi /etc/network/interfaces auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.2.127 naemask 255.255.255.0 gateway 192.168.2.1 设置DNS sudo vi /etc/resolv.conf 在下边添加:nameserver 114.114.114.114 重启网络 sudo /etc/init.d/networking restart