Search My Techie Guy

Saturday, December 1, 2012

How to change your IP address on command line - Ubuntu ?

If you find yourself in a situation where by you have to manually configure your IP address using command line on Ubuntu. just follow these simple steps (Am using Ubuntu 10.10):
My Techie Guy
1. Make sure you know the IP address you want to assign to your computer and also the subnet mask, for example; IP = 10.192.1.190 and Subnet Mask = 255.255.255.0
2. #ifconfig -a  (This command displays the current interface configuration, use it to note the interface name, for example "eth0")
3. #sudo su  (yes! you have to be root to modify system settings, this will ask you for the root password, punch it in and hit enter)
4. #ifconfig eth0 down  (first bring the interface down)
5. #ifconfig eth0 inet 10.192.1.190 netmask 255.255.255.0 (assigns eth0 that IP address and subnet mask)
6. #ifconfig eth0 down up (bring the interface back up)
7. #ifconfig -a (verify that your configurations have been effected)
8. Have fun!

1 comment:

Adams said...

This is a great and less complicated IP Address change Idea with Ubuntu command line. In fact many people end up using third party software to change their IP address yet using the Tip above seems to work better than one can imagine. A few days back, I came across another IP change Idea which I had never thought about for example Changing IP Address by installing only a Browser imagine. There seem to so many tips and its only that we don't know.

Thank you for such a great post and Bravo!.