Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142900409
D26663.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
817 B
Referenced Files
None
Subscribers
None
D26663.diff
View Options
Index: head/bin/hostname/hostname.1
===================================================================
--- head/bin/hostname/hostname.1
+++ head/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 @@
.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
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jan 25, 2:01 PM (8 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27944975
Default Alt Text
D26663.diff (817 B)
Attached To
Mode
D26663: hostname(1): Add EXAMPLES to man page
Attached
Detach File
Event Timeline
Log In to Comment