Related to change hostname debian

Change Hostname on Debian 9 - Do it Now ?

This article covers how to change the hostname on Debian 9 system using different methods. Basically, the hostname is a label that is assigned during the initial server setup and it is used to identify and easily distinguish one server from another. 

To check your current hostname:

$ hostname

And to check your Fully Qualified Domain name (FQDN) you can run the following command instead:

$ hostname -f

How to Change your Debian hostname ?

1. To change your hostname, we can simply run the following command:

$ hostname new.hostname.com

2. So in order to change our hostname permanently, you will need to update this file. You can open it with your favorite text editor, for example:

$ nano /etc/hostname

3. Change the hostname, save the file and exit the text editor.