How to Change IP Address in Linux

How to Change IP Address in Linux

Hi friends, in this tutorial we will guide you through How to Change IP Address in Linux, or you can say Change IP of Linux machine, How to Change IP-Address in CentOS / RedHat Linux. Changing of IP address in Windows machine is so simple, but on other hand it’s a bit difficult on Linux machine. This is just because of Linux is not a GUI based operating system. Administration on Linux machine are done by Terminals or Putty.

You can check network configuration by following command in linux: ifconfig

1. Open Terminal > Login with root.

2. Type following and hit enter.

vi /etc/sysconfig/network-scripts/ifcfg-eth0 

3. Press on keyboard, this will take the opened file in insert mode.

4. Put IP address, Subnet Mask, Gateway, DNS as mentioned below.

How to Change IP Address in Linux

5. Press ESC key on keyboard, and write following :wq! are hit enter. This will save changes.

6. Restart network services by following command:

service network restart

Video Tutorial: