type
[unix-history] / usr / src / bin / hostname / hostname.1
CommitLineData
d9d7a9f0 1.\" Copyright (c) 1983, 1988, 1990 The Regents of the University of California.
ed77ebd8 2.\" All rights reserved.
0b6ba29a 3.\"
27c71911 4.\" %sccs.include.redist.man%
ed77ebd8 5.\"
d0719240 6.\" @(#)hostname.1 6.7 (Berkeley) %G%
0b6ba29a 7.\"
73c88b5b
CL
8.Vx
9.Vx
d9d7a9f0
CL
10.Dd
11.Dt HOSTNAME 1
12.Os BSD 4.2
13.Sh NAME
14.Nm hostname
15.Nd set or print name of current host system
16.Sh SYNOPSIS
17.Nm hostname
18.Op Fl s
19.Op Ar nameofhost
20.Sh DESCRIPTION
21.Nm Hostname
22prints the name of the current host. The super-user can
ed77ebd8 23set the hostname by supplying an argument; this is usually done in the
d9d7a9f0
CL
24network initialization script
25.Pa /etc/netstart ,
26normally run at boot
27time.
28.Pp
29Options:
5325ced3 30.Tw Ds
d9d7a9f0
CL
31.Tp Fl s
32Trims off any domain information from the printed
ed77ebd8 33name.
d9d7a9f0
CL
34.Tp
35.Sh SEE ALSO
5325ced3 36.Xr gethostname 2
d9d7a9f0
CL
37.Sh HISTORY
38.Nm Hostname
39appeared in 4.2 BSD.