Change IP on Red Hat Server

Is there a simple way to modify an IP address on Linux Red Hat Server?
exhuserAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

savoneCommented:
edit the /etc/sysconfig/network-scripts/ifcfg-eth0 file (replace eth0 with the name of your iterface) and change the IPADDR line.  You may also have to change the netmask.  If the gateway needs to be changed it can be in this file or in /etc/sysconfig/network.


for example:

DEVICE="eth0"
HWADDR="00:50:56:81:00:F3"
NM_CONTROLLED="no"
ONBOOT="yes"
IPADDR="192.168.16.5"
NETMASK="255.255.255.0"
bootproto=none
exhuserAuthor Commented:
Is there a GUI interface to do this?

And this can be done in the text editor, correct?
Mohammed KhawajaManager - Infrastructure:  Information TechnologyCommented:
Run the following command:

system-config-network-tui


This will run from the server console as well as from a SSH session also.
Active Protection takes the fight to cryptojacking

While there were several headline-grabbing ransomware attacks during in 2017, another big threat started appearing at the same time that didn’t get the same coverage – illicit cryptomining.

Shiju JacobInfo Security ManagerCommented:
try

system-config-network-gui

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
savoneCommented:
Typically servers don't have the GUI interface enabled (in my world anyway).  If you have gnome (which is a GUI) you can use gedit, which is the default text editor, to edit the file.  You will have to open it with elevated permissions either by opening as root or using sudo.

Yes is can be done via a text editor as stated above (if you have GUI).  It can also be done, and typically is done, with vi editor.

vi editor is a little scary for first time users, but in my experience I couldn't live without it.
NAMEWITHELD12Commented:
the easiest way I found ,and I am lazy is ......


"sudo yum install network-manager "

then

"nmtui"
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.