Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using windows 7 as host OS, then I installed linux mint debian as guest OS.

My Windows 7 is using dynamic ip. Here is the setting:


Currently network adapter in virtualbox is using NAT.

If I want to use static ip in linux guest OS, how to do it?

share|improve this question
up vote 2 down vote accepted

If you do want network connection (so access to your LAN) select Bridged Adapter in the VirtualBox settings > Network. On linux you can set the ip in /etc/network/interfaces. When done, reboot the interface with ifdown interface & ifup interface (or service networking restart).

iface *interface* inet static
address *ipaddress*
gateway *gateway*
share|improve this answer
I think I found the GUI tool for to do this :) (Menu -> Administration -> Network), pardon for my laziness, once a windows user. I had put the static ip address and subnet mask, but I don't know what value to put for the gateway address. Do you know? – suud Oct 22 '12 at 10:03
Gateway address is your router IP. – Jeroen Oct 22 '12 at 10:06
so it's same as the windows host OS has? ? – suud Oct 22 '12 at 10:07
That is correct. – Jeroen Oct 22 '12 at 10:07
Oh my bad. Posted for CentOS :) Changed it now. – Jeroen Oct 22 '12 at 10:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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