How to change the hostname in RHEL7

At last, Red Hat has decided to act like other distros to change the hostname of the server in Red Hat Enterprise Linux 7.

In older Red Hat releases, changing the hostname required modifying the  “/etc/sysconfig/network” configuration file and edit the “HOSTNAME” parameter.

Now, all you have to do is – like other distros such as Ubuntu and LinuxMint – edit the “/etc/hostname” file and change the name there, that’s it!

Unknown's avatar

About Ahmed Tawfik

Cybersecurity Professional, Systems Engineer, OSS & Linux Geek
This entry was posted in Linux and tagged , , , . Bookmark the permalink.

Leave a comment