1 .\" $Id: man.1,v 1.35 2019/03/09 15:55:01 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: March 9 2019 $
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.
67 Normally, only the first page found is displayed.
71 instead of the default configuration file.
72 This permits users to configure their own manual environment.
75 for a description of the contents of this file.
77 Copy the manual page to the standard output instead of using
80 This is done by default if the standard output is not a terminal device.
84 most terminal devices are unable to show the markup.
85 To print the output of
87 to the terminal with markup but without using a pager, pipe it to
89 To remove the markup, pipe the output to
98 in manual page names and displays the header lines from all matching pages.
99 The search is case insensitive and matches whole words only.
101 Display only the SYNOPSIS lines of the requested manual pages.
111 an expression can be provided using the syntax described in the
114 By default, it displays the header lines of all matching pages.
120 arguments are interpreted as filenames.
121 No search is done and
132 Override the list of standard directories which
134 searches for manual pages.
139 separated list of directories.
140 This search path may also be set using the environment variable
143 Augment the list of standard directories which
145 searches for manual pages.
150 separated list of directories.
151 These directories will be searched before the standard directories or
152 the directories specified using the
156 environment variable.
157 .It Fl S Ar subsection
158 Only show pages for the specified
164 By default manual pages for all architectures are installed.
165 Therefore this option can be used to view pages for one
166 architecture whilst using another.
168 This option overrides the
170 environment variable.
171 .It Oo Fl s Oc Ar section
172 Only select manuals from the specified
174 The currently available sections are:
176 .Bl -tag -width "localXXX" -offset indent -compact
179 .Pq tools and utilities .
181 System calls and error numbers.
186 programmer's reference guide.
194 Miscellaneous information.
196 System maintenance and operation commands.
201 If not specified and a match is found in more than one section,
202 the first match is selected from the following list:
203 1, 8, 6, 2, 3, 5, 7, 4, 9, 3p.
205 List the pathnames of all matching manual pages instead of displaying
211 are also supported and are documented in
215 are mutually exclusive and override each other.
217 Guidelines for writing
218 man pages can be found in
223 database is used for looking up manual page entries.
224 In cases where the database is absent, outdated, or corrupt,
226 falls back to looking for files called
227 .Ar name . Ns Ar section .
228 If both a formatted and an unformatted version of the same manual page,
233 exist in the same directory, only the unformatted version is used.
234 The database is kept up to date with
240 .Bl -tag -width MANPATHX
242 As some manual pages are intended only for specific architectures,
244 searches any subdirectories,
245 with the same name as the current architecture,
246 in every directory which it searches.
247 Machine specific areas are checked before general areas.
248 The current machine type may be overridden by setting the environment
251 to the name of a specific architecture,
258 Any non-empty value of the environment variable
260 is used instead of the standard pagination program,
264 is used, the interactive
266 command can be used to go to the definitions of various terms, for
267 example command line options, command modifiers, internal commands,
268 environment variables, function names, preprocessor macros,
270 values, and some other emphasized words.
271 Some terms may have defining text at more than one place.
278 can be used to move to the next and to the previous place providing
279 information about the term last searched for with
282 .Fl O Cm tag Ns Op = Ns Ar term
283 option documented in the
285 manual opens a manual page at the definition of a specific
287 rather than at the beginning.
289 The standard search path used by
291 may be changed by specifying a path in the
293 environment variable.
294 The format of the path is a colon
296 separated list of directories.
297 Invalid paths are ignored.
306 begins with a colon, it is appended to the default list;
307 if it ends with a colon, it is prepended to the default list;
308 or if it contains two adjacent colons,
309 the standard search path is inserted between the colons.
310 If none of these conditions are met, it overrides the
311 standard search path.
313 Specifies the pagination program to use when
316 If neither PAGER nor MANPAGER is defined,
322 .Bl -tag -width /etc/man.conf -compact
324 default man configuration file
332 Format a page for pasting extracts into an email message \(em
333 avoid printing any UTF-8 characters, reduce the width to ease
334 quoting in replies, and remove markup:
336 .Dl $ man -T ascii -O width=65 pledge | col -b
338 Read a typeset page in a PDF viewer:
340 .Dl $ MANPAGER=mupdf man -T pdf lpd
352 utility is compliant with the
357 .Op Fl aCcfhIKlMmOSsTWw ,
358 as well as the environment variables
363 are extensions to that specification.
367 command first appeared in
372 option first appeared in
412 option first appeared in
414 and was also added in