RHEL 7 How to change the hostname for a server, new commands ?

RHEL 7 introduced some new commands so it wouldn’t be like the older versions if you have to change the hostname, looking for commands to change the hostname, check this out :

 

hostname
nirvana

A static hostname file exists with entry of hostname under /etc/hostname, you can use command line option to change the hostname :

 

[root@nirvana ~]# hostnamectl set-hostname ciscomaster.mozilla.org
[root@nirvana ~]# hostname
ciscomaster.mozilla.org

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s