How to Set or Change Hostname in Linux

The hostname is the name of the machine using which it is identified on a network. It can be anything from a single word string to a complex name. Each hostname has a corresponding numerical address which also identifies the machine on the network.