Solved

RHEL, how do I change IP address

Posted on 2013-11-26
6
322 Views
Last Modified: 2013-12-04
I am running on RHEL 6.4

I do not have a GUI

How do I change my IP address

Thanks
0
Comment
Question by:Los Angeles1
6 Comments
 
LVL 12

Expert Comment

by:Chris Staunton
ID: 39678711
modify the /etc/sysconfig/network-scripts/ifcfg-eth?  generally ifcfg-eth0 file.
0
 
LVL 19

Expert Comment

by:Patricksr1972
ID: 39678712
You have to change the IP address entry in /etc/sysconfig/network-scripts/ifcfg-eth0
save and run: service network restart
0
 
LVL 44

Expert Comment

by:Darr247
ID: 39678735
Another way is with DHCP reservations. What is acting as your DHCP server?
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
LVL 19

Accepted Solution

by:
xterm earned 500 total points
ID: 39678851
You would also need to change it in /etc/hosts, and /etc/sysconfig/network would need a hostname change if that too is changing (in addition to /etc/sysconfig/network-scripts/ifcfg-eth0)

However, if you're not comfortable using Unix text editors, just run the command "setup", and highlight the entry for "Network Configuration", and tab down to "Run Tool", and then go into "Device Configuration".

Once you "Save & Exit", the changes should take place right away but if not, run "service network restart"
0
 
LVL 25

Expert Comment

by:madunix
ID: 39680063
you can set #ifconfig eth0 192.168.1.1 netmask 255.255.255.0, but it will not permanent, for that you have to change the configuration file
/etc/sysconfig/network-scripts/ifcfg-eth0
You have to make changes in above file, according to the device ifcfg-eth0 , ifcfg-eth1 ...
0
 

Author Closing Comment

by:Los Angeles1
ID: 39695668
'setup' works great
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question