Executing the command
hostname newHostName alone, apparently, is not enough.
To change the hostname:
/etc/hostname using your favorite text editor. Mine is vi improved
2. Change the old host name into the new host name in
/etc/hosts. Usually the second line that states
3. Issue the command
4. Log out and then log back in. No need to restart.
This also works on Debian-based distributions like Ubuntu and Linux Mint.