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?

3 Answers 3


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

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.


Has anyone out there every attempted this?

Ummmmm. Yes.

Just change the IP if that's what you want to do. Or don't do that and just spin a new VM if you'd prefer.

  • Sorry, never done it, did not know ;-) Mar 3, 2014 at 21:45

(Since I must not add a comment due to my rep points, I have to add an answer...)

Beyond Sam's answer above, also note that some services on that machine may need to be re-configured. Especially bad when you are running an Oracle db on that machine: the IP address of the machine at the time of installation is buried somewhere in its configuration files, and must be changed manually. Some other programs may show similarly odd behavior.

Not the answer you're looking for? Browse other questions tagged or ask your own question.