Ubuntu 12.4 VM Change Static IP [closed]

I am wondering if you have the option to change the static IP on a Ubuntu VM or if you should just spin a new virtual machine up? Has anyone out there every attempted this?

Answer

Edit /etc/network/interfaces

Find the config for eth0 (it will look something like below) and change to your preference

auto eth0
iface eth0 inet static
address 10.0.0.2
netmask 255.255.255.0

Documentation on interfaces file can be found here : http://manpages.ubuntu.com/manpages/lucid/man5/interfaces.5.html

After you have changed the above you will need to restart networking

sudo /etc/init.d/networking restart

or reboot the computer.

Attribution
Source : Link , Question Author : AgnosticDev , Answer Author : Sam

Leave a Comment