xref: /freebsd/usr.bin/man/man.1 (revision 17ee9d00bc1ae1e598c38f25826f861e4bc6c3ce)
1.\" Copyright (c) 1989, 1990, 1993
2.\"	The Regents of the University of California.  All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\" 3. All advertising materials mentioning features or use of this software
13.\"    must display the following acknowledgement:
14.\"	This product includes software developed by the University of
15.\"	California, Berkeley and its contributors.
16.\" 4. Neither the name of the University nor the names of its contributors
17.\"    may be used to endorse or promote products derived from this software
18.\"    without specific prior written permission.
19.\"
20.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\"     @(#)man.1	8.2 (Berkeley) 1/2/94
33.\"
34.Dd January 2, 1994
35.Dt MAN 1
36.Os BSD 4
37.Sh NAME
38.Nm man
39.Nd display the on-line manual pages
40.Sh SYNOPSIS
41.Nm man
42.Op Fl achw
43.Op Fl C Ar file
44.Op Fl M Ar path
45.Op Fl m Ar path
46.Op Ar section
47.Ar name Ar ...
48.Sh DESCRIPTION
49The
50.Nm man
51utility
52displays the
53.Bx
54manual pages entitled
55.Ar name .
56.Pp
57The options are as follows:
58.Bl -tag -width indent
59.It Fl a
60Display all of the manual pages for a specified
61.Ar section
62and
63.Ar name
64combination.
65(Normally, only the first manual page found is displayed.)
66.It Fl C
67Use the specified
68.Ar file
69instead of the default configuration file.
70This permits users to configure their own manual environment.
71See
72.Xr man.conf 5
73for a description of the contents of this file.
74.It Fl c
75Copy the manual page to the standard output instead of using
76.Xr more 1
77to paginate it.
78This is done by default if the standard output is not a terminal device.
79.It Fl h
80Display only the
81.Dq Tn SYNOPSIS
82lines of the requested manual pages.
83.It Fl M
84Override the list of standard directories which
85.Nm man
86searches for manual pages.
87The supplied
88.Ar path
89must be a colon (``:'') separated list of directories.
90This search path may also be set using the environment variable
91.Ev MANPATH .
92The subdirectories to be searched, and their search order,
93is specified by the ``_subdir'' line in the
94.Nm man
95configuration file.
96.It Fl m
97Augment the list of standard directories which
98.Nm man
99searches for manual pages.
100The supplied
101.Ar path
102must be a colon (``:'') separated list of directories.
103These directories will be searched before the standard directories or
104the directories specified using the
105.Fl M
106option or the
107.Ev MANPATH
108environment variable.
109The subdirectories to be searched, and their search order,
110is specified by the ``_subdir'' line in the
111.Nm man
112configuration file.
113.It Fl w
114List the pathnames of the manual pages which
115.Nm man
116would display for the specified
117.Ar section
118and
119.Ar name
120combination.
121.El
122.Pp
123The optional
124.Ar section
125argument restricts the directories that
126.Nm man
127will search.
128The
129.Nm man
130configuration file (see
131.Xr man.conf 5 )
132specifies the possible
133.Ar section
134values that are currently available.
135If only a single argument is specified or if the first argument is
136not a valid section,
137.Nm man
138assumes that the argument is the name of a manual page to be displayed.
139.Sh ENVIRONMENT
140.Bl -tag -width MANPATHX
141.It Ev MACHINE
142As some manual pages are intended only for specific architectures,
143.Nm man
144searches any subdirectories,
145with the same name as the current architecture,
146in every directory which it searches.
147Machine specific areas are checked before general areas.
148The current machine type may be overridden by setting the environment
149variable
150.Ev MACHINE
151to the name of a specific architecture.
152.It Ev MANPATH
153The standard search path used by
154.Nm man
155may be overridden by specifying a path in the
156.Ev MANPATH
157environment
158variable.
159The format of the path is a colon (``:'') separated list of directories.
160The subdirectories to be searched as well as their search order
161is specified by the ``_subdir'' line in the
162.Nm man
163configuration file.
164.It Ev PAGER
165Any value of the environment variable
166.Ev PAGER
167will be used instead of the standard pagination program,
168.Xr more 1 .
169.El
170.Sh FILES
171.Bl -tag -width /etc/man.conf -compact
172.It Pa /etc/man.conf
173default man configuration file.
174.El
175.Sh SEE ALSO
176.Xr apropos 1 ,
177.Xr whatis 1 ,
178.Xr whereis 1 ,
179.Xr man.conf 5
180.Sh BUGS
181The on-line manual pages are, by necessity, forgiving toward stupid
182display devices, causing a few manual pages to not as nicely formatted
183as their typeset counterparts.
184.Sh HISTORY
185A
186.Nm
187command appeared in
188.At v6 .
189