The hostname is what the server is called. When someone is dealing with multiple servers, they would need to know which server they is working with. If all the servers had similar names, it would prove to be difficult to work with.
Lets assume there is 3 servers and they are called the following:
root@server1:~# root@server2:~# root@server3:~#
This will be very hard for us to manage as they all look very similar. We can look to change the host name, where by it would be more distinguish for us to understand.
We can complete this task at:
sudo nano /etc/hostname
By changing the value inside this location, we can modify the host name of our server. This will provide us with:
root@alpha:~# root@beta:~# root@gamma:~#
Of course you can use other names of your choice depending on your preference of hostnames.
There is a cleaner way to edit the host name, we can use the following command of:
hostnamectl set-hostname alpha This will achieve the same objective however we wouldn't need to edit the file of /etc/hostname.