How to Change Your IP Address in Linux Shell

so you want to know how you can change your ip address through the unix shell

well changing it it very easy you can us ifconfig to change it

first make sure you are logged in with root access if you are not logged in as root send this command to access root level

su -


once you have root access we can begin changing our ip address so lets say i want to change my server's ip address to this one: 192.168.1.123 so to modify and edit the changes i send this command:

ifconfig eth0 192.168.1.123 up


now restart your network. im using redhat fedora or centos will work also:


Chris
Tue Aug 05, 2008
nice tip. alternatively you can also try performing the same in text mode and gui mode.

for configuring in text mode:

system-config-network-

for configuring in gui mode:

system-configu-network
c_david38
Wed Jul 23, 2008