修改ubuntu虚拟机ip

sudo gedit /etc/network/interfaces

更改为以下内容:

auto lo

iface lo inet loopback

# Assgin static IP by Joe on 25-FEB-2014

iface eth0 inet static

address 192.168.220.203

netmask 255.255.255.0

gateway 192.168.220.2

#We must specify dns-nameserver here

#in order to get internet access from host

dns-nameservers 192.168.220.2

auto eth0

参考: http://www.cnblogs.com/objectorl/archive/2012/09/27/vmware-ubuntu-nat-static-ip-settings.html

dns

相关推荐