hostname

The Linux hostname command is used to view or change a systems domain and hostname. It can also check a computers IP address.

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.

Get long hostname:

hostname -f
Get IP address of the host:
hostname -i