How do you view your hostname?
Step 1 : You need to use the hostname command or hostnamectl command
Step 2 : Output from the hostname command
Setting the hostname
Step 1 :Changing the hostname is fairly simple. To do this, we can use the hostnamectl command as root or with sudo.
Step 2 : Open the /etc/hosts file and change the old hostname to the new one.
Step 3 : Verify the change