Static IP in Ubuntu

It's all in the file /etc/network/interfaces. You should see an entry like this:

auto eth0
iface eth0 inet dhcp

Change it to something like this

auto eth0
iface eth0 inet static


/etc/init.d/networking restart

At this point…you'll usually lose connection 🙁

…but that's good, because your static IP should be working! 🙂 Just reconnect!

(You'll lose connection unless you're working directly on the console, or your static IP is the same as your dynamic IP. In which case, good for you! You're much more on-the-ball than I usually am.)

Here's more info on converting from dhcp to static IP.

Leave a Reply

Your email address will not be published.