Linux: Set IP address through shell
by Ali on Jan.09, 2009, under Linux
To change IP address immediately:
ifconfig eth0 192.168.1.10 netmask 255.255.255.0 up or ifonfig eth0 192.168.1.10/24
route add default gw 192.168.1.1
echo nameserver 192.168.1.1 > /etc/resolv.conf
To the extent possible under law, the creator has waived all copyright and related or neighboring rights to this work.