hostname(1) — Commands
OSF
NAME
hostname − Sets or displays the name of the current host system
SYNOPSIS
hostname [new_name]
DESCRIPTION
The hostname command sets or displays the name of the current host system. Only the superuser can set the hostname.
EXAMPLES
1.To display the name of the local host, enter:
$ hostname
host1
2.To change the name of the local host, enter:
# hostname west
FILES
/etc/hostsDefines the Interface Program name and address of the local host.
RELATED INFORMATION
Commands: hostid(1).
Functions: gethostname(2), sethostname(2).