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!
Post a Comment