1 .\" $Id: man.1,v 1.36 2020/01/07 11:16:33 schwarze Exp $
3 .\" Copyright (c) 1989, 1990, 1993
4 .\" The Regents of the University of California. All rights reserved.
5 .\" Copyright (c) 2003, 2007, 2008, 2014 Jason McIntyre <jmc@openbsd.org>
6 .\" Copyright (c) 2010, 2011, 2014-2018 Ingo Schwarze <schwarze@openbsd.org>
8 .\" Redistribution and use in source and binary forms, with or without
9 .\" modification, are permitted provided that the following conditions
11 .\" 1. Redistributions of source code must retain the above copyright
12 .\" notice, this list of conditions and the following disclaimer.
13 .\" 2. Redistributions in binary form must reproduce the above copyright
14 .\" notice, this list of conditions and the following disclaimer in the
15 .\" documentation and/or other materials provided with the distribution.
16 .\" 3. 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.
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
32 .\" @(#)man.1 8.2 (Berkeley) 1/2/94
34 .Dd $Mdocdate: January 7 2020 $
39 .Nd display manual pages
46 .Op Fl S Ar subsection
47 .Op Oo Fl s Oc Ar section
56 Pages may be selected according to
63 The options are as follows:
66 Display all matching manual pages.
70 instead of the default configuration file.
71 This permits users to configure their own manual environment.
74 for a description of the contents of this file.
76 Copy the manual page to the standard output instead of using
79 This is done by default if the standard output is not a terminal device.
83 most terminal devices are unable to show the markup.
84 To print the output of
86 to the terminal with markup but without using a pager, pipe it to
88 To remove the markup, pipe the output to
97 in manual page names and displays the header lines from all matching pages.
98 The search is case insensitive and matches whole words only.
100 Display only the SYNOPSIS lines of the requested manual pages.
110 an expression can be provided using the syntax described in the
113 By default, it displays the header lines of all matching pages.
119 arguments are interpreted as filenames.
120 No search is done and
131 Override the list of directories to search for manual pages.
136 separated list of directories.
137 This option also overrides the environment variable
139 and any directories specified in the
143 Augment the list of directories to search for manual pages.
148 separated list of directories.
149 These directories will be searched before those specified using the
153 environment variable, the
155 file, or the default directories.
156 .It Fl S Ar subsection
157 Only show pages for the specified
163 By default manual pages for all architectures are installed.
164 Therefore this option can be used to view pages for one
165 architecture whilst using another.
167 This option overrides the
169 environment variable.
170 .It Oo Fl s Oc Ar section
171 Only select manuals from the specified
173 The currently available sections are:
175 .Bl -tag -width "localXXX" -offset indent -compact
178 .Pq tools and utilities .
180 System calls and error numbers.
185 programmer's reference guide.
193 Miscellaneous information.
195 System maintenance and operation commands.
200 List the pathnames of all matching manual pages instead of displaying
206 are also supported and are documented in
210 are mutually exclusive and override each other.
212 The search starts with the
214 argument if provided, then continues with the
223 .Pa /usr/share/man : Ns Pa /usr/X11R6/man : Ns Pa /usr/local/man
225 Within each of these, directories are searched in the order provided.
226 Within each directory, the search proceeds according to the following
227 list of sections: 1, 8, 6, 2, 3, 5, 7, 4, 9, 3p.
228 The first match found is shown.
232 database is used for looking up manual page entries.
233 In cases where the database is absent, outdated, or corrupt,
235 falls back to looking for files called
236 .Ar name . Ns Ar section .
237 If both a formatted and an unformatted version of the same manual page,
242 exist in the same directory, only the unformatted version is used.
243 The database is kept up to date with
249 Guidelines for writing
250 man pages can be found in
253 .Bl -tag -width MANPATHX
255 As some manual pages are intended only for specific architectures,
257 searches any subdirectories,
258 with the same name as the current architecture,
259 in every directory which it searches.
260 Machine specific areas are checked before general areas.
261 The current machine type may be overridden by setting the environment
264 to the name of a specific architecture,
271 Any non-empty value of the environment variable
273 is used instead of the standard pagination program,
277 is used, the interactive
279 command can be used to go to the definitions of various terms, for
280 example command line options, command modifiers, internal commands,
281 environment variables, function names, preprocessor macros,
283 values, and some other emphasized words.
284 Some terms may have defining text at more than one place.
291 can be used to move to the next and to the previous place providing
292 information about the term last searched for with
295 .Fl O Cm tag Ns Op = Ns Ar term
296 option documented in the
298 manual opens a manual page at the definition of a specific
300 rather than at the beginning.
302 Override the standard search path which is either specified in
309 separated list of directories.
310 Invalid directories are ignored.
319 begins with a colon, it is appended to the standard path;
320 if it ends with a colon, it is prepended to the standard path;
321 or if it contains two adjacent colons,
322 the standard path is inserted between the colons.
324 Specifies the pagination program to use when
327 If neither PAGER nor MANPAGER is defined,
333 .Bl -tag -width /etc/man.conf -compact
345 Format a page for pasting extracts into an email message \(em
346 avoid printing any UTF-8 characters, reduce the width to ease
347 quoting in replies, and remove markup:
349 .Dl $ man -T ascii -O width=65 pledge | col -b
351 Read a typeset page in a PDF viewer:
353 .Dl $ MANPAGER=mupdf man -T pdf lpd
365 utility is compliant with the
370 .Op Fl aCcfhIKlMmOSsTWw ,
371 as well as the environment variables
376 are extensions to that specification.
380 command first appeared in
385 option first appeared in
425 option first appeared in
427 and was also added in