Skip to main content


Showing posts from November, 2010

How to setup a static ipaddress via the command line in linux

From time to time I need to do some manual network configuration via the command line in Linux.  At one time I would gasp at the thought, with the help of Google I have become very comfortable with command line activity.

Here is a great article from  They go into a lot more detail.  I have put the info below that I used:

Howto: Ubuntu Linux convert DHCP network configuration to static IP configuration

Open network configuration file
$ sudo vi /etc/network/interfacesOR$ sudo nano /etc/network/interfaces Find and remove dhcp entry:
iface eth0 inet dhcp Append new network settings: iface eth0 inet static
Save and close the file. Restart the network:
$ sudo /etc/init.d/networking restart