A target can be assigned a host name. This is an arbitrary name that by default is not related to names that, for example, can be resolved in a DNS server or the /etc/hosts file. This is due to the fact that host names could always be assigned to UNIX workstations even before workstations were networked together!
The hostname command can be used to temporarily set or retrieve this name. Generally, the name is set at boot time using either of the following ways.Even though the target´s host name is arbitrary and cannot be used for networking, it is still possible to setup the host PC and the target in such a way that the chosen host name does resolve to an IP address. This can be done by editing /etc/hosts on the host PC and the target.
The syntax for the /etc/hosts file is:
<IP Address> <Host Name> [alias 1] [alias 2] [alias 3]