Obtaining the Hostname

To obtain the hostname, type the hostname command.

Example  

% hostname

worf

In this example, the host name is worf.