1MAN(1)                    BSD General Commands Manual                   MAN(1)
2

NAME

4     man — display manual pages
5

SYNOPSIS

7     man [-acfhklw] [-C file] [-M path] [-m path] [-S subsection]
8         [[-s] section] name ...
9

DESCRIPTION

11     The man utility displays the manual pages entitled name.  Pages may be
12     selected according to a specific category (section) or machine architec‐
13     ture (subsection).
14
15     The options are as follows:
16
17     -a      Display all matching manual pages.  Normally, only the first page
18             found is displayed.
19
20     -C file
21             Use the specified file instead of the default configuration file.
22             This permits users to configure their own manual environment.
23             See man.conf(5) for a description of the contents of this file.
24
25     -c      Copy the manual page to the standard output instead of using
26             more(1) to paginate it.  This is done by default if the standard
27             output is not a terminal device.
28
29             When using -c, most terminal devices are unable to show the
30             markup.  To print the output of man to the terminal with markup
31             but without using a pager, pipe it to ul(1).  To remove the
32             markup, pipe the output to col(1) -b instead.
33
34     -f      A synonym for whatis(1).  It searches for name in manual page
35             names and displays the header lines from all matching pages.  The
36             search is case insensitive and matches whole words only.
37
38     -h      Display only the SYNOPSIS lines of the requested manual pages.
39             Implies -a and -c.
40
41     -k      A synonym for apropos(1).  Instead of name, an expression can be
42             provided using the syntax described in the apropos(1) manual.  By
43             default, it displays the header lines of all matching pages.
44
45     -l      A synonym for mandoc(1).  The name arguments are interpreted as
46             filenames.  No search is done and file, path, section,
47             subsection, and -w are ignored.  This option implies -a.
48
49     -M path
50             Override the list of standard directories which man searches for
51             manual pages.  The supplied path must be a colon (‘:’) separated
52             list of directories.  This search path may also be set using the
53             environment variable MANPATH.
54
55     -m path
56             Augment the list of standard directories which man searches for
57             manual pages.  The supplied path must be a colon (‘:’) separated
58             list of directories.  These directories will be searched before
59             the standard directories or the directories specified using the
60             -M option or the MANPATH environment variable.
61
62     -S subsection
63             Only show pages for the specified machine(1) architecture.
64             subsection is case insensitive.
65
66             By default manual pages for all architectures are installed.
67             Therefore this option can be used to view pages for one architec‐
68             ture whilst using another.
69
70             This option overrides the MACHINE environment variable.
71
72     [-s] section
73             Only select manuals from the specified section.  The currently
74             available sections are:
75
76                   1         General commands (tools and utilities).
77                   2         System calls and error numbers.
78                   3         Library functions.
79                   3p        perl(1) programmer's reference guide.
80                   4         Device drivers.
81                   5         File formats.
82                   6         Games.
83                   7         Miscellaneous information.
84                   8         System maintenance and operation commands.
85                   9         Kernel internals.
86
87             If not specified and a match is found in more than one section,
88             the first match is selected from the following list: 1, 8, 6, 2,
89             3, 5, 7, 4, 9, 3p.
90
91     -w      List the pathnames of all matching manual pages instead of dis‐
92             playing any of them.
93
94     The options -IKOTW are also supported and are documented in mandoc(1).
95     The options -fkl are mutually exclusive and override each other.
96
97     Guidelines for writing man pages can be found in mdoc(7).
98
99     The mandoc.db(5) database is used for looking up manual page entries.  In
100     cases where the database is absent, outdated, or corrupt, man falls back
101     to looking for files called name.section.  If both a formatted and an
102     unformatted version of the same manual page, for example cat1/foo.0 and
103     man1/foo.1, exist in the same directory, only the unformatted version is
104     used.  The database is kept up to date with makewhatis(8), which is run
105     by the weekly(8) maintenance script.
106

ENVIRONMENT

108     MACHINE   As some manual pages are intended only for specific architec‐
109               tures, man searches any subdirectories, with the same name as
110               the current architecture, in every directory which it searches.
111               Machine specific areas are checked before general areas.  The
112               current machine type may be overridden by setting the environ‐
113               ment variable MACHINE to the name of a specific architecture,
114               or with the -S option.  MACHINE is case insensitive.
115
116     MANPAGER  Any non-empty value of the environment variable MANPAGER is
117               used instead of the standard pagination program, more(1).  If
118               less(1) is used, the interactive :t command can be used to go
119               to the definitions of various terms, for example command line
120               options, command modifiers, internal commands, environment
121               variables, function names, preprocessor macros, errno(2) val‐
122               ues, and some other emphasized words.  Some terms may have
123               defining text at more than one place.  In that case, the
124               less(1) interactive commands t and T can be used to move to the
125               next and to the previous place providing information about the
126               term last searched for with :t.  The -O tag[=term] option docu‐
127               mented in the mandoc(1) manual opens a manual page at the defi‐
128               nition of a specific term rather than at the beginning.
129
130     MANPATH   The standard search path used by man may be changed by specify‐
131               ing a path in the MANPATH environment variable.  The format of
132               the path is a colon (‘:’) separated list of directories.
133               Invalid paths are ignored.  Overridden by -M, ignored if -l is
134               specified.
135
136               If MANPATH begins with a colon, it is appended to the default
137               list; if it ends with a colon, it is prepended to the default
138               list; or if it contains two adjacent colons, the standard
139               search path is inserted between the colons.  If none of these
140               conditions are met, it overrides the standard search path.
141
142     PAGER     Specifies the pagination program to use when MANPAGER is not
143               defined.  If neither PAGER nor MANPAGER is defined, more(1) -s
144               is used.
145

FILES

147     /etc/man.conf  default man configuration file
148

EXIT STATUS

150     The man utility exits 0 on success, and >0 if an error occurs.  See
151     mandoc(1) for details.
152

EXAMPLES

154     Format a page for pasting extracts into an email message — avoid printing
155     any UTF-8 characters, reduce the width to ease quoting in replies, and
156     remove markup:
157
158           $ man -T ascii -O width=65 pledge | col -b
159
160     Read a typeset page in a PDF viewer:
161
162           $ MANPAGER=mupdf man -T pdf lpd
163

SEE ALSO

165     apropos(1), col(1), mandoc(1), ul(1), whereis(1), man.conf(5), mdoc(7)
166

STANDARDS

168     The man utility is compliant with the IEEE Std 1003.1-2008 (“POSIX.1”)
169     specification.
170
171     The flags [-aCcfhIKlMmOSsTWw], as well as the environment variables
172     MACHINE, MANPAGER, and MANPATH, are extensions to that specification.
173

HISTORY

175     A man command first appeared in Version 3 AT&T UNIX.
176
177     The -w option first appeared in Version 7 AT&T UNIX; -f and -k in 4BSD;
178     -M in 4.3BSD; -a in 4.3BSD-Tahoe; -c and -m in 4.3BSD-Reno; -h in 4.3BSD
179     Net/2; -C in NetBSD 1.0; -s and -S in OpenBSD 2.3; and -I, -K, -l, -O,
180     and -W in OpenBSD 5.7.  The -T option first appeared in AT&T UNIX III and
181     was also added in OpenBSD 5.7.
182
183BSD                              May 10, 2020                              BSD
Impressum