Content-type: text/html
hostname - Sets or displays the name of the current host system
hostname [-s] [new_name]
The
hostname
command sets or displays the name of
the current host system. If you use the
-s
option, the short
form of the host name is displayed.
Only
the superuser can set the hostname.
To display the short form of the local host name, enter: $ hostname -s host1 To change the name of the local host, enter: # hostname west
Defines the Interface Program name and address of the local
host.
Commands: hostid(1)
Functions: gethostname(2), sethostname(2)