Print this page
3758 RFE: Would like "hostname -s"
3430 Support "hostname --fqdn"
*** 4,22 ****
NAME
hostname - set or print name of current host system
SYNOPSIS
! /usr/bin/hostname [name-of-host]
DESCRIPTION
The hostname command prints the name of the current host, as given
before the login prompt. The super-user can set the hostname by giving
an argument.
SEE ALSO
uname(1), attributes(5)
! September 14, 1992 HOSTNAME(1)
--- 4,38 ----
NAME
hostname - set or print name of current host system
SYNOPSIS
! /usr/bin/hostname [-fls | name-of-host]
DESCRIPTION
The hostname command prints the name of the current host, as given
before the login prompt. The super-user can set the hostname by giving
an argument.
+
+ OPTIONS
+ For compatibility long arguments are also supported.
+
+
+ -f, --fqdn print out the FQDN (fully qualified domain name).
+
+ -l, --long alias for -f, --fqdn.
+
+ -s, --short strip domain information from hostname.
+
+
+ The hostname command cannot be used to set the fqdn, long or short
+ name.
+
+
SEE ALSO
uname(1), attributes(5)
! May 11, 2016 HOSTNAME(1)