hostname

HOSTNAME(1)                Linux Programmer's Manual               HOSTNAME(1)



NAME
       hostname - show or set the system's host name
       dnsdomainname - show the system's domain name

SYNOPSIS
       hostname [-a] [--alias] [-d] [--domain] [-F filename] [--file filename]
       [-f] [--fqdn] [-h] [--help] [-i] [--ip-address] [--long] [-s] [--short]
       [-v] [--version] [name]
       dnsdomainname

DESCRIPTION
       Hostname is the program that is used to either set the host name or
       display the current host or domain name of the system.  This name is
       used by many of the networking programs to identify the machine.

       When called without any arguments, the program displays the current
       name as set by the hostname command. You can change the output format
       to display always the short or the long host name (FQDN). When called
       with arguments, the program will set the value of the host name to the
       value specified.  This usually is done only once, at system startup
       time, by the /etc/rc.d/rc.inet1 configuration script.

       Note, that only the super-user can change the host name.

       If the program was called as dnsdomainname it will show the DNS domain
       name. You can't change the DNS domain name with dnsdomainname (see
       below).

OPTIONS
       -a, --alias
              Display the alias name of the host (if used).

       -d, --domain
              Display the name of the DNS domain. Don't use the command
              domainname to get the DNS domain name because it will show the
              NIS domain name and not the DNS domain name.

       -F, --file filename
              Read the host name from the specified file. Comments (lines
              starting with a `#') are ignored.

       -f, --fqdn, --long
              Display the FQDN (Fully Qualified Domain Name). A FQDN consists
              of a short host name and the DNS domain name. Unless you are
              using bind or NIS for host lookups you can change the FQDN and
              the DNS domain name (which is part of the FQDN) in the
              /etc/hosts file.

       -h, --help
              Print a usage message on standard output and exit successfully.

       -i, --ip-address
              Display the IP address(es) of the host.

       -s, --short
              Display the short host name.

       -v, --version
              Print version information on standard output and exit
              successfully.

FILES
       /etc/hosts

AUTHOR
       Peter Tobias, <tobias@et-inf.fho-emden.de>




Linux                            28 July 1994                      HOSTNAME(1)