aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorFernando ApesteguĂ­a <fernape@FreeBSD.org>2020-10-05 13:46:19 +0000
committerFernando ApesteguĂ­a <fernape@FreeBSD.org>2020-10-05 13:46:19 +0000
commit5145778475a781de3f159ce08e03f40c954f4975 (patch)
tree2b410e6ac08b9b172588443538cac49387b010c8 /bin
parentad3d2e7e4a18575f825b65a19e49720a513d2343 (diff)
downloadsrc-5145778475a781de3f159ce08e03f40c954f4975.tar.gz
src-5145778475a781de3f159ce08e03f40c954f4975.zip
hostname(1): Add EXAMPLES to man page
Add a very simple set of examples Approved by: manpages (bcr@) Differential Revision: https://reviews.freebsd.org/D26663
Notes
Notes: svn path=/head/; revision=366446
Diffstat (limited to 'bin')
-rw-r--r--bin/hostname/hostname.121
1 files changed, 20 insertions, 1 deletions
diff --git a/bin/hostname/hostname.1 b/bin/hostname/hostname.1
index d99b591fd8ad..45e5e14f4464 100644
--- a/bin/hostname/hostname.1
+++ b/bin/hostname/hostname.1
@@ -29,7 +29,7 @@
.\" @(#)hostname.1 8.2 (Berkeley) 4/28/95
.\" $FreeBSD$
.\"
-.Dd November 10, 2016
+.Dd October 5, 2020
.Dt HOSTNAME 1
.Os
.Sh NAME
@@ -66,6 +66,25 @@ name.
.It Fl d
Only print domain information.
.El
+.Sh EXAMPLES
+Set the host name of the machine and check the result:
+.Bd -literal -offset indent
+$ hostname beastie.localdomain.org
+$ hostname
+beastie.localdomain.org
+.Ed
+.Pp
+Do not show domain information:
+.Bd -literal -offset indent
+$ hostname -s
+beastie
+.Ed
+.Pp
+Show only domain information:
+.Bd -literal -offset indent
+$ hostname -d
+localdomain.org
+.Ed
.Sh SEE ALSO
.Xr gethostname 3 ,
.Xr rc.conf 5