Tuesday, May 13, 2008

Manually change IP info on Linux

To change the IP address on Linux manually, do the following:

$ sudo vi /etc/network/interfaces

You should see something like this:

auto eth0
iface eth0 inet dhcp

Change it to this:

auto etho
iface eth0 inet static
address 192.168.1.00
netmask 255.255.255.0
gateway 192.168.1.1

replacing the IP addresses with your network addresses....

To change the DNS settings, do the following:

$ sudo vi /etc/resolv.conf

add the DNS servers IP address that you want to use


When you are done make sure you restart the networking components:

$ sudo /etc/init.d/networking restart

No comments: