Change hostname or Server name of a Linux Machine

Filed under

Checking your Linux host name

First, see if your host name is set correclty using the following commands:
#uname -n
#hostname -a
#hostname -s
#hostname -d
#hostname -f

If the above commands return correctly with no errors then all may be well; however, you may want to read on to verify that all settings are correct.

Normally we will set the hostname of a system during the installation process.

Change the hostname on a running Linux system

On any Linux system you can change its hostname with the command ‘hostname‘.

Full Story.