How To Change Hostname Without Rebooting Linux Server

How To Change Hostname? You can change Linux Hostname without rebooting, So you need to use the below command. There’re many ways to change the host-name of a server. When you assign a hostname to any machine. So, you can recognize them with their name assigned because it’s very difficult to identify the server if you haven’t given any name to it.

Once you gave a name, you need to reboot the machine in rhel 6 version but there’s a command in rhel 7 where a reboot is not required with a single command, you can set the name.

How To Change Hostname Without Rebooting Linux Server:

We can find the name of any server by log in and then run this hostname command. This will give you the name of the server. Sometimes it also helps you to make connectivity between the servers. you can point the IP address to the hostname. So, the machine can locally resolve each other.

Check Out: Check Hostname

Change Hostname without Rebooting in redhat 7

hostnamectl set-hostname grafana

Change Hostname in Redhat/Centos 6

You will have made an entry in vim /etc/sysconfig/network file

hostname= grafana

Check Out: Installation of Awstats For Analyzing Apache Logs

Then make a Permanent entry in /etc/hosts and need to restart it.

ipaddress hostname

You’re done

Share on:

I'm the founder of Curious Viral. I hope this blog will provide you complete information about Linux Technology & I would like to share my technical knowledge with you which I have learned during this period.

Other Posts You May Like...

Leave a comment