How to change IP Address on Linux Redhat
Linux April 20th, 2008Introduction
Most of the time, I work in Windows environment. But I sometimes have to work on Linux platform, too. So I decide to note it down this topic to remind myself.
There are many ways to change IP Address on Linux. First one is the easiest way that configure on GUI because it’s like on Windows platform. The second way is configure on command-line but it is only temporary, it’ll reload to the old configuration when the network service is restart. And the last one is also configure on command-line to change IP Address permanently.
Section
- Configure on GUI (Permanently)
- Configure on commad-line (Temporary)
- Configure on commad-line by edit configuration file (Permanently)
Step-by-step
Configure on GUI (Permanently)
- Select Application -> System Settings ->Network.

- On Network Configuration and Devices tab, you’ll see available network card on the PC. In this example, the PC has 1 network interface card (NIC) and it’s currently inactive. Double click on the network interface card (NIC) that you want to configure to open its property.

- On Ethernet Device, you can configure the NIC to be either DHCP or static IP Address. When you finish, click OK.

- There is a pop-up message ask for activate the NIC. Click Yes to enable the NIC.

- The NIC will be restarted to reload the new configurations and the NIC is active now.

Configure on commad-line (Temporary)
Note: This way change IP Address only temporary. When you restart network service, it’ll load from configuration file to replace this configuration.
- Open Terminal.
- Type
ifconfig -a
- Type
ifconfig eth0 192.168.125.10 netmask 255.255.255.0 up
-
Note: To configure gateway, type
route add default gw [gateway address].
Configure on commad-line by edit configuration file (Permanently)
- Open Terminal.
- Open network configuration file. In this example, it’ll configure on interface eth0. Type
vi /etc/sysconfig/network-scripts/ifcfg-eth0
- The current configuration is DHCP.

- Modify the file by press ‘i’ to enter insert mode. Change BOOTPROTO to static and add IP Address and Net mask as new lines if they’re not existed yet..
BOOTPROTO=static
IPADDR=192.168.125.10
NETMASK=255.255.255.0Save the configuration file by press ESC + ‘:’ and type ‘wq’ to write and quit the editor.

- You can added these configuration to the config file. Replace [number] with your actual value.
GATEWAY=[number]
TYPE=Ethernet
NETWORK=[number]
BROADCAST=[number] - Restart the network interface card. Type
service network restart
- Review the configuration. Type
ifconfig
Related post
- How to install VMWare Server on Linux Redhat Introduction Nowadays, virtualization is a solution which is interested by many IT manager. By converting existing system to virtual, you...
- How to setup Stand-Alone Kaspersky Anti-Virus 5.7 Workstation on Linux RedHat Introduction Kaspersky Anti-Virus is now one of the popular anti-virus softwares. The strong point are that it can detect and...
Related posts:








April 22nd, 2008 at 1:16 pm
[...] How to change IP Address on Linux Redhat http://www.linglom.com/2008/04/20/how-to-change-ip-address-on-linux-redhat/ [...]
April 28th, 2008 at 3:46 pm
Today it is easy updating IP Address when we are using GUI mode. Previous my favourite command was ifconfig down and ifconfig up.
June 15th, 2009 at 4:48 pm
give me some infomation abt linux opresting system i want to be learn Thankyou
June 19th, 2009 at 6:40 pm
That was a excellent step by step instruction on how to change the IP.
Most other sites get a bit too technical and spin off a load of jargon.
I found this very easy to follow.
Thanks
August 27th, 2009 at 2:05 am
Thanks man, this was by far the easiest instructions I found on how to do it.
September 3rd, 2009 at 10:11 pm
It was useful for me , Thank you .
January 4th, 2010 at 6:23 pm
Thanks .. that was like a quick refresh ..