×

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.



This article will guide you on how to change your Ubuntu server hostname without restarting the system.




More Linux Tutorials

We create Linux HowTos and Tutorials for Sys Admins. Visit us on IbmiMedia.com

Also for Tech related tips, Visit forum.outsourcepath.com or General Technical tips on www.outsourcepath.com