This tutorial shows how to setting up network connection after installing Ubuntu guest machine on Windows host using Vmware.
For convenience, I installed both Ubuntu guest on Windows host and Windows guest on Ubuntu host using Vmware. Windows guest machine automatically connected to internet after installation, but Ubuntu guest machine didn’t. To get Ubuntu’s internet connection work,we need do following configurations:

1. In Vmware window, launch the Virutal Machine Settings and set network adapter method NAT

2. In windows host, head to Start -> Run -> cmd -> ipconfig. There we need:

in the picture: vmware network adapter ip address for NAT devices, use as dns and gateway ~ hold back ~ dhcp for virtual machines

3. In Ubuntu Virtual machine, open up terminal:

edit /etc/network/interfaces with your favorite editor:

sudo gedit /etc/network/interfaces

copy and paste following to make it look like:

iface eth0 inet static




  auto eth0

edit /etc/resolv.conf:

sudo gedit /etc/resolv.conf

add this line:


Now restart network service by:

sudo /etc/init.d/network restart