If you’re like most people, your desktop computer is probably connected to the Internet through a dynamic IP address. That means that every time you turn on your computer, the IP address assigned to it by your ISP changes. This can be frustrating if you want to keep a certain website or application open all the time, or if you need to troubleshoot a networking issue. To assign a static IP address to your Ubuntu 10.04 desktop computer, follow these steps:

  1. Open a terminal window by pressing Ctrl+Alt+T in Ubuntu 10.04 or by clicking the Applications Menu and selecting Terminal from the list of options.
  2. Type the following command and press Enter: sudo ifconfig eth0 192.168.1.10 netmask 255.255.255.0 broadcast 192.168.1.255 3a If you want to use an existing static IP address that’s already been assigned to another device on your network, type the following command and press Enter: sudo ifconfig eth0 netmask broadcast 3b If you want to create a new static IP address that’s not currently in use on your network, type the following command and press Enter: sudo ifconfig eth0 up 4a To verify that your static IP address has been assigned correctly, type the following command and press Enter: ping 192.168 . 1 . 10 4b To test whether any applications or websites are using the new static IP address, type the following command and press Enter: telnet 192 . 168 . 1 . 10 ..

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 0.0.0.0

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.