1MAN(1) BSD General Commands Manual MAN(1)
2
4 man — display manual pages
5
7 man [-acfhklw] [-C file] [-M path] [-m path] [-S subsection]
8 [[-s] section] name ...
9
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 If both a formatted and an unformatted version of the same manual page,
100 for example cat1/foo.0 and man1/foo.1, exist in the same directory, only
101 the unformatted version is used.
102
104 MACHINE As some manual pages are intended only for specific architec‐
105 tures, man searches any subdirectories, with the same name as
106 the current architecture, in every directory which it searches.
107 Machine specific areas are checked before general areas. The
108 current machine type may be overridden by setting the environ‐
109 ment variable MACHINE to the name of a specific architecture,
110 or with the -S option. MACHINE is case insensitive.
111
112 MANPAGER Any non-empty value of the environment variable MANPAGER is
113 used instead of the standard pagination program, more(1). If
114 less(1) is used, the interactive :t command can be used to go
115 to the definitions of various terms, for example command line
116 options, command modifiers, internal commands, environment
117 variables, function names, preprocessor macros, errno(2) val‐
118 ues, and some other emphasized words. Some terms may have
119 defining text at more than one place. In that case, the
120 less(1) interactive commands t and T can be used to move to the
121 next and to the previous place providing information about the
122 term last searched for with :t.
123
124 MANPATH The standard search path used by man may be changed by specify‐
125 ing a path in the MANPATH environment variable. The format of
126 the path is a colon (‘:’) separated list of directories.
127 Invalid paths are ignored. Overridden by -M, ignored if -l is
128 specified.
129
130 If MANPATH begins with a colon, it is appended to the default
131 list; if it ends with a colon, it is prepended to the default
132 list; or if it contains two adjacent colons, the standard
133 search path is inserted between the colons. If none of these
134 conditions are met, it overrides the standard search path.
135
136 PAGER Specifies the pagination program to use when MANPAGER is not
137 defined. If neither PAGER nor MANPAGER is defined, more(1) -s
138 is used.
139
141 /etc/man.conf default man configuration file
142
144 The man utility exits 0 on success, and >0 if an error occurs. See
145 mandoc(1) for details.
146
148 Format a page for pasting extracts into an email message — avoid printing
149 any UTF-8 characters, reduce the width to ease quoting in replies, and
150 remove markup:
151
152 $ man -T ascii -O width=65 pledge | col -b
153
154 Read a typeset page in a PDF viewer:
155
156 $ MANPAGER=mupdf man -T pdf lpd
157
159 apropos(1), col(1), mandoc(1), ul(1), whereis(1), man.conf(5), mdoc(7)
160
162 The man utility is compliant with the IEEE Std 1003.1-2008 (“POSIX.1”)
163 specification.
164
165 The flags [-aCcfhIKlMmOSsTWw], as well as the environment variables
166 MACHINE, MANPAGER, and MANPATH, are extensions to that specification.
167
169 A man command first appeared in Version 3 AT&T UNIX.
170
171 The -w option first appeared in Version 7 AT&T UNIX; -f and -k in 4BSD;
172 -M in 4.3BSD; -a in 4.3BSD-Tahoe; -c and -m in 4.3BSD-Reno; -h in 4.3BSD
173 Net/2; -C in NetBSD 1.0; -s and -S in OpenBSD 2.3; and -I, -K, -l, -O,
174 and -W in OpenBSD 5.7. The -T option first appeared in AT&T UNIX III and
175 was also added in OpenBSD 5.7.
176
177BSD June 20, 2019 BSD