HOSTNAME(1) User Commands HOSTNAME(1)
NAME
hostname - set or print name of current host system
SYNOPSIS
hostname [
-s] [
name-of-host]
DESCRIPTION
The
hostname command prints the name of the current host, as given before
the
login(1) prompt. The super-user can set the hostname by giving
name-of-host.
While setting the hostname changes the hostname for the running system, it
does not persist the change. The proper way to update the hostname will
vary depending on how the system is configured. For most systems, the
persistent hostname is stored in the file
/etc/nodename. See
nodename(5) for more information on how to update it. Note, the
/etc/nodename file may
be ignored in cases where the system is configured to use DHCP.
OPTIONS
-s Prints only the part of the hostname preceding the first dot.
SEE ALSO
uname(1),
nodename(5),
attributes(7)illumos August 26, 2016 illumos