xref: /original-bsd/bin/hostname/hostname.1 (revision 27393bdf)
1.\" Copyright (c) 1983, 1988, 1990, 1993
2.\"	The Regents of the University of California.  All rights reserved.
3.\"
4.\" %sccs.include.redist.roff%
5.\"
6.\"	@(#)hostname.1	8.2 (Berkeley) 04/28/95
7.\"
8.Dd
9.Dt HOSTNAME 1
10.Os BSD 4.2
11.Sh NAME
12.Nm hostname
13.Nd set or print name of current host system
14.Sh SYNOPSIS
15.Nm hostname
16.Op Fl s
17.Op Ar name-of-host
18.Sh DESCRIPTION
19.Nm Hostname
20prints the name of the current host.  The super-user can
21set the hostname by supplying an argument; this is usually done in the
22network initialization script
23.Pa /etc/netstart ,
24normally run at boot
25time.
26.Pp
27Options:
28.Bl -tag -width flag
29.It Fl s
30Trims off any domain information from the printed
31name.
32.El
33.Sh SEE ALSO
34.Xr gethostname 2 ,
35.Xr sethostname 2
36.Sh HISTORY
37The
38.Nm hostname
39command appeared in
40.Bx 4.2 .
41