Commit | Line | Data |
---|---|---|
d9d7a9f0 | 1 | .\" Copyright (c) 1983, 1988, 1990 The Regents of the University of California. |
ed77ebd8 | 2 | .\" All rights reserved. |
0b6ba29a | 3 | .\" |
28c11414 | 4 | .\" %sccs.include.redist.roff% |
ed77ebd8 | 5 | .\" |
28c11414 | 6 | .\" @(#)hostname.1 6.8 (Berkeley) %G% |
0b6ba29a | 7 | .\" |
d9d7a9f0 CL |
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 nameofhost | |
18 | .Sh DESCRIPTION | |
19 | .Nm Hostname | |
20 | prints the name of the current host. The super-user can | |
ed77ebd8 | 21 | set the hostname by supplying an argument; this is usually done in the |
d9d7a9f0 CL |
22 | network initialization script |
23 | .Pa /etc/netstart , | |
24 | normally run at boot | |
25 | time. | |
26 | .Pp | |
27 | Options: | |
28c11414 CL |
28 | .Bl -tag -width flag |
29 | .It Fl s | |
d9d7a9f0 | 30 | Trims off any domain information from the printed |
ed77ebd8 | 31 | name. |
28c11414 | 32 | .El |
d9d7a9f0 | 33 | .Sh SEE ALSO |
5325ced3 | 34 | .Xr gethostname 2 |
d9d7a9f0 | 35 | .Sh HISTORY |
28c11414 CL |
36 | The |
37 | .Nm hostname | |
38 | command appeared in | |
39 | .Bx 4.2 . |