HOSTNAME(1,C) AIX TCP/IP User's Guide HOSTNAME(1,C)
-------------------------------------------------------------------------------
hostname
PURPOSE
Sets or prints name of current host system.
SYNTAX
+------+
+----| |----+
hostname ---| +- -v -+ |---|
+- name_of_host -+
DESCRIPTION
The hostname command displays the name of the current host. If you have
superuser authority, you can change the host name and address by supplying the
name-of-host parameter. This is usually done in the startup script /etc/rc.
If no parameter is supplied, the hostname command prints the name. The
hostname command does not modify the /etc/hosts file.
A gateway host (a host that connects independent networks) has multiple
interfaces, each with a different name and address. The hostname command sets
the primary name of the gateway host. References to gateway hosts can be by
primary or secondary name.
FLAGS
-v Verbose output that includes node and Internet address.
PARAMETERS
name_of_host
Must be supplied in the /etc/hosts file to set the host name and the
Internet address of this host. The name_of_host is a character string of
up to 24 characters. Superuser authority is required.
EXAMPLES
o To display the name and address of the local host :
$ hostname
host1
$ -
o To change the name of the local host :
Processed October 29, 1990 HOSTNAME(1,C) 1
HOSTNAME(1,C) AIX TCP/IP User's Guide HOSTNAME(1,C)
# hostname west
# -
Processed October 29, 1990 HOSTNAME(1,C) 2
HOSTNAME(1,C) AIX TCP/IP User's Guide HOSTNAME(1,C)
FILES
/etc/hosts
RELATED INFORMATION
gethostname, sethostname, refer to AIX Operating System Technical Reference
Processed October 29, 1990 HOSTNAME(1,C) 3