How to set or change IP address in Linux – Linux IP Administration
How to set IP Address in Linux
- Using setup command configure IP address
- Using ifconfig command check the status
- Modifying ifcfg-ethX file
File path /etc/sysconfig/network-scripts/
Steps:
Open terminal, run setup command. Below screen will appear.

Select network configuration. Below screen will appear

Select Device configuration. Below screen will appear, you will see the ethernet interfaces

Select the interface you want to set IP address. We select eth0 , below screen appear

remove DHCP by pressing spacebar, you can change the selection using arrow key. After modification select Ok and press enter to save the data

Select save and press enter to save the device

Select save & quite

Select Quit to exit from the setup utility.
Now run ifconfig command to check the IP and interface status and its showing that IP not updated yet

Go to the location /etc/sysconfig/network-scripts/
modify the file ifcfg-eth0 using vi ifcfg-eth0

press i to modify the file, comment the NM_CONTROLLED line. Update yes for ONBOOT and save the file using esc and write “:wq” press enter to save and quite the file.

To check the hands on visit the below you tube video