default | grid-3 | grid-2

Post per Page

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 Cybercity.biz.  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
address 192.168.1.100
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1

Save and close the file. Restart the network:
$ sudo /etc/init.d/networking restart


No comments

Error Page Image

Error Page Image

Oooops.... Could not find it!!!

The page you were looking for, could not be found. You may have typed the address incorrectly or you may have used an outdated link.

Go to Homepage