HOSTNAME(1) |
General Commands Manual |
HOSTNAME(1) |
NAME
hostname — set or print name of current host system
SYNOPSIS
hostname |
[-AadfIis] [name-of-host] |
DESCRIPTION
hostname prints the name of the current host. The super-user can set the host name by supplying an argument; this is usually done in the network initialization script
/etc/rc.d/network, normally run at boot time.
Options:
-
-A
-
Display the FQDN of each address on all interfaces.
-
-a
-
Display alias name(s) of the host.
-
-d
-
Display the DNS domain.
-
-f
-
Display the FQDN for the hostname.
-
-I
-
Display each IP address on all interfaces.
-
-i
-
Display the IP address(es) for the hostname.
-
-s
-
Display the short hostname.
NOTES
With the exception of -I and -s, the other options will retrieve their results from the resolver.
HISTORY
The hostname utility appeared in 4.2BSD.