Tecmint: A hostname command is used to view a computer’s hostname and domain name (DNS) (Domain Name Service), and to display or set a computer’s hostname or domain name.
A hostname is a name that is given to a computer that attached to the network that uniquely identifies over a network and thus allows it to be accessed without using its IP address.