How-To Geek

How to Assign a Static IP to an Ubuntu 10.04 Desktop Computer

If you have a home network with several computers, assigning them static IP addresses can make troubleshooting easier. Today we take a look at switching from DHCP to a static IP in Ubuntu.

Assign a Static IP

Using Static IPs prevents address conflicts between machines and can allow easier access to them. If you have a small home network and are satisfied with the machines getting their IP address automatically via DHCP, there won’t be anything gained by using static addresses.

Using Static IPs isn’t necessarily for the average user, but if you’re a geek who wants to know the address assigned to each machine, it can allow for faster troubleshooting. 

To change your Ubuntu machine to a Static IP go to System \ Preferences \ Network Connections.


In our example, we’re on a wired system so click on the Wired tab, then select Auto eth0 and click on Edit.


Select the IPv4 settings tab, change Method to Manual, click the Add button. Then type in the Static IP Address, Subnet Mask, DNS Servers, and Default Gateway. Then click Apply when you’re finished.

Make sure to hit Enter after typing in the Default Gateway otherwise it will revert back to


You’ll need to enter in your admin password before the changes go into affect.


To verify the changes have been made successfully launch a Terminal session and type in ifconfig at the command prompt, or follow these directions. You also might want to ping the address from another machine to make sure everything is communicating.


If you want to assign a Static IP to your Windows machines, check out our article on how to assign a Static IP on Windows systems (make sure to browse the comments as our readers have some good suggestions). 

Whether you have a small office or home network set up with a server and several machines, using a Static IP on each device can help you manage them easily. Again, it isn’t for everyone as it really depends on how your network is setup and the way you use it.

Brian Burgess worked in IT for 10 years before pursuing his passion for writing. He's been a tech blogger and journalist for the past seven years, and can be found on his about me page or Google+

  • Published 06/15/10

Comments (9)

  1. Ahmed

    OMG i was wondering where was that !
    Thanks :)

  2. Geekyard

    Cool Mate…It helped me to download Torrent files

  3. mcdjork

    A CLI tutorial would be helpful too!

  4. philefluxx

    CLI can be found here:

    Its an older doc, but works the same none the less.

  5. msreddy

    That,s going to be nice

  6. networkgeek

    I can’t seem to set it in /etc/network/interfaces since version 10. This worked. :)

  7. sarmad

    Cool, but how about the gateway if you are working only locally. Where do we bring the gateway IP from

  8. Toddzbox

    Just solved an issue that’s bugged me for a couple of week. Thanks. I renamed my Ubuntu net book to a 192.168…etc and pointed it to my wireless hub. Strange thing my hub still sees it as 10.10…

  9. Nick

    Did you have to modify /etc/resolv.conf also?

    example adding an entry like:

More Articles You Might Like

Enter Your Email Here to Get Access for Free:

Go check your email!