Thursday, January 30, 2014

How to change the IP address on Linux

We already have an Ubuntu 9.04 server which is our email server and we also control sharing of Internet with it. A couple of days back our Dell server failed.So we are trying the installation of Ubuntu 12.04. We had put the same IP address that we normally use for the Linux server but meanwhile we managed to get a machine up with the hard disk from our server which is now down. So we needed to know how to change the IP address on Ubuntu 12.04 to something else now. Run the following commands and it will do the trick.

sudo su
ifconfig eth0 192.168.100.101 netmask 255.255.255.0

Run ifconfig to make sure that the change has taken effect.But this is not all.
Edit the following file using the vi editor and change the IP adress here too.
vi /etc/network/interfaces

0 comments:

Post a Comment