Print this page
3758 RFE: Would like "hostname -s"
3430 Support "hostname --fqdn"
@@ -1,24 +1,38 @@
'\" te
.\" Copyright (c) 1992, Sun Microsystems, Inc.
+\." Copyright 2016 RackTop Systems.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.TH HOSTNAME 1 "Sep 14, 1992"
+.TH HOSTNAME 1 "May 11, 2016"
.SH NAME
hostname \- set or print name of current host system
.SH SYNOPSIS
.LP
.nf
-\fB/usr/bin/hostname\fR [\fIname-of-host\fR]
+\fB/usr/bin/hostname\fR [\fI-fs\fR | \fIname-of-host\fR]
.fi
.SH DESCRIPTION
.sp
.LP
The \fBhostname\fR command prints the name of the current host, as given before
the \fBlogin\fR prompt. The super-user can set the hostname by giving an
argument.
+.sp
+.SH OPTIONS
+.sp
+For compatibility long arguments are also supported.
+.sp
+.LP
+\fB-f, --fqdn, --long\fR print out the fully qualified domain name.
+.sp
+\fB-s, --short\fR strip domain information from hostname.
+.sp
+.LP
+The \fBhostname\fR command cannot be used to set the fqdn, long or short name.
+.sp
.SH SEE ALSO
.sp
.LP
\fBuname\fR(1), \fBattributes\fR(5)