1MAN(1) Manual pager utils MAN(1)
2
3
4
6 man - an interface to the on-line reference manuals
7
9 man [-C file] [-d] [-D] [--warnings[=warnings]] [-R encoding] [-L
10 locale] [-m system[,...]] [-M path] [-S list] [-e extension] [-i|-I]
11 [--regex|--wildcard] [--names-only] [-a] [-u] [--no-subpages] [-P
12 pager] [-r prompt] [-7] [-E encoding] [--no-hyphenation] [--no-justifi‐
13 cation] [-p string] [-t] [-T[device]] [-H[browser]] [-X[dpi]] [-Z]
14 [[section] page[.section] ...] ...
15 man -k [apropos options] regexp ...
16 man -K [-w|-W] [-S list] [-i|-I] [--regex] [section] term ...
17 man -f [whatis options] page ...
18 man -l [-C file] [-d] [-D] [--warnings[=warnings]] [-R encoding] [-L
19 locale] [-P pager] [-r prompt] [-7] [-E encoding] [-p string] [-t]
20 [-T[device]] [-H[browser]] [-X[dpi]] [-Z] file ...
21 man -w|-W [-C file] [-d] [-D] page ...
22 man -c [-C file] [-d] [-D] page ...
23 man [-?V]
24
26 man is the system's manual pager. Each page argument given to man is
27 normally the name of a program, utility or function. The manual page
28 associated with each of these arguments is then found and displayed. A
29 section, if provided, will direct man to look only in that section of
30 the manual. The default action is to search in all of the available
31 sections following a pre-defined order ("1 1p 8 2 3 3p 3pm 4 5 6 7 9 0p
32 n l p o 1x 2x 3x 4x 5x 6x 7x 8x" by default, unless overridden by the
33 SECTION directive in /etc/man_db.conf), and to show only the first page
34 found, even if page exists in several sections.
35
36 The table below shows the section numbers of the manual followed by the
37 types of pages they contain.
38
39
40 1 Executable programs or shell commands
41 2 System calls (functions provided by the kernel)
42 3 Library calls (functions within program libraries)
43 4 Special files (usually found in /dev)
44 5 File formats and conventions eg /etc/passwd
45 6 Games
46 7 Miscellaneous (including macro packages and conventions), e.g.
47 man(7), groff(7)
48 8 System administration commands (usually only for root)
49 9 Kernel routines [Non standard]
50
51 A manual page consists of several sections.
52
53 Conventional section names include NAME, SYNOPSIS, CONFIGURATION,
54 DESCRIPTION, OPTIONS, EXIT STATUS, RETURN VALUE, ERRORS, ENVIRONMENT,
55 FILES, VERSIONS, CONFORMING TO, NOTES, BUGS, EXAMPLE, AUTHORS, and
56 SEE ALSO.
57
58 The following conventions apply to the SYNOPSIS section and can be used
59 as a guide in other sections.
60
61
62 bold text type exactly as shown.
63 italic text replace with appropriate argument.
64 [-abc] any or all arguments within [ ] are optional.
65 -a|-b options delimited by | cannot be used together.
66
67 argument ... argument is repeatable.
68 [expression] ... entire expression within [ ] is repeatable.
69
70 Exact rendering may vary depending on the output device. For instance,
71 man will usually not be able to render italics when running in a termi‐
72 nal, and will typically use underlined or coloured text instead.
73
74 The command or function illustration is a pattern that should match all
75 possible invocations. In some cases it is advisable to illustrate sev‐
76 eral exclusive invocations as is shown in the SYNOPSIS section of this
77 manual page.
78
80 man ls
81 Display the manual page for the item (program) ls.
82
83 man man.7
84 Display the manual page for macro package man from section 7.
85
86 man -a intro
87 Display, in succession, all of the available intro manual pages
88 contained within the manual. It is possible to quit between suc‐
89 cessive displays or skip any of them.
90
91 man -t alias | lpr -Pps
92 Format the manual page referenced by `alias', usually a shell man‐
93 ual page, into the default troff or groff format and pipe it to the
94 printer named ps. The default output for groff is usually Post‐
95 Script. man --help should advise as to which processor is bound to
96 the -t option.
97
98 man -l -Tdvi ./foo.1x.gz > ./foo.1x.dvi
99 This command will decompress and format the nroff source manual
100 page ./foo.1x.gz into a device independent (dvi) file. The redi‐
101 rection is necessary as the -T flag causes output to be directed to
102 stdout with no pager. The output could be viewed with a program
103 such as xdvi or further processed into PostScript using a program
104 such as dvips.
105
106 man -k printf
107 Search the short descriptions and manual page names for the keyword
108 printf as regular expression. Print out any matches. Equivalent
109 to apropos printf.
110
111 man -f smail
112 Lookup the manual pages referenced by smail and print out the short
113 descriptions of any found. Equivalent to whatis smail.
114
116 Many options are available to man in order to give as much flexibility
117 as possible to the user. Changes can be made to the search path, sec‐
118 tion order, output processor, and other behaviours and operations
119 detailed below.
120
121 If set, various environment variables are interrogated to determine the
122 operation of man. It is possible to set the `catch all' variable
123 $MANOPT to any string in command line format with the exception that
124 any spaces used as part of an option's argument must be escaped (pre‐
125 ceded by a backslash). man will parse $MANOPT prior to parsing its own
126 command line. Those options requiring an argument will be overridden
127 by the same options found on the command line. To reset all of the
128 options set in $MANOPT, -D can be specified as the initial command line
129 option. This will allow man to `forget' about the options specified in
130 $MANOPT although they must still have been valid.
131
132 The manual pager utilities packaged as man-db make extensive use of
133 index database caches. These caches contain information such as where
134 each manual page can be found on the filesystem and what its whatis
135 (short one line description of the man page) contains, and allow man to
136 run faster than if it had to search the filesystem each time to find
137 the appropriate manual page. If requested using the -u option, man
138 will ensure that the caches remain consistent, which can obviate the
139 need to manually run software to update traditional whatis text data‐
140 bases.
141
142 If man cannot find a mandb initiated index database for a particular
143 manual page hierarchy, it will still search for the requested manual
144 pages, although file globbing will be necessary to search within that
145 hierarchy. If whatis or apropos fails to find an index it will try to
146 extract information from a traditional whatis database instead.
147
148 These utilities support compressed source nroff files having, by
149 default, the extensions of .Z, .z and .gz. It is possible to deal with
150 any compression extension, but this information must be known at com‐
151 pile time. Also, by default, any cat pages produced are compressed
152 using gzip. Each `global' manual page hierarchy such as /usr/share/man
153 or /usr/X11R6/man may have any directory as its cat page hierarchy.
154 Traditionally the cat pages are stored under the same hierarchy as the
155 man pages, but for reasons such as those specified in the File Hierar‐
156 chy Standard (FHS), it may be better to store them elsewhere. For
157 details on how to do this, please read manpath(5). For details on why
158 to do this, read the standard.
159
160 International support is available with this package. Native language
161 manual pages are accessible (if available on your system) via use of
162 locale functions. To activate such support, it is necessary to set
163 either $LC_MESSAGES, $LANG or another system dependent environment
164 variable to your language locale, usually specified in the POSIX 1003.1
165 based format:
166
167 <language>[_<territory>[.<character-set>[,<version>]]]
168
169 If the desired page is available in your locale, it will be displayed
170 in lieu of the standard (usually American English) page.
171
172 Support for international message catalogues is also featured in this
173 package and can be activated in the same way, again if available. If
174 you find that the manual pages and message catalogues supplied with
175 this package are not available in your native language and you would
176 like to supply them, please contact the maintainer who will be coordi‐
177 nating such activity.
178
179 For information regarding other features and extensions available with
180 this manual pager, please read the documents supplied with the package.
181
183 man will search for the desired manual pages within the index database
184 caches. If the -u option is given, a cache consistency check is per‐
185 formed to ensure the databases accurately reflect the filesystem. If
186 this option is always given, it is not generally necessary to run mandb
187 after the caches are initially created, unless a cache becomes corrupt.
188 However, the cache consistency check can be slow on systems with many
189 manual pages installed, so it is not performed by default, and system
190 administrators may wish to run mandb every week or so to keep the data‐
191 base caches fresh. To forestall problems caused by outdated caches,
192 man will fall back to file globbing if a cache lookup fails, just as it
193 would if no cache was present.
194
195 Once a manual page has been located, a check is performed to find out
196 if a relative preformatted `cat' file already exists and is newer than
197 the nroff file. If it does and is, this preformatted file is (usually)
198 decompressed and then displayed, via use of a pager. The pager can be
199 specified in a number of ways, or else will fall back to a default is
200 used (see option -P for details). If no cat is found or is older than
201 the nroff file, the nroff is filtered through various programs and is
202 shown immediately.
203
204 If a cat file can be produced (a relative cat directory exists and has
205 appropriate permissions), man will compress and store the cat file in
206 the background.
207
208 The filters are deciphered by a number of means. Firstly, the command
209 line option -p or the environment variable $MANROFFSEQ is interrogated.
210 If -p was not used and the environment variable was not set, the ini‐
211 tial line of the nroff file is parsed for a preprocessor string. To
212 contain a valid preprocessor string, the first line must resemble
213
214 '\" <string>
215
216 where string can be any combination of letters described by option -p
217 below.
218
219 If none of the above methods provide any filter information, a default
220 set is used.
221
222 A formatting pipeline is formed from the filters and the primary for‐
223 matter (nroff or [tg]roff with -t) and executed. Alternatively, if an
224 executable program mandb_nfmt (or mandb_tfmt with -t) exists in the man
225 tree root, it is executed instead. It gets passed the manual source
226 file, the preprocessor string, and optionally the device specified with
227 -T or -E as arguments.
228
230 Non argument options that are duplicated either on the command line, in
231 $MANOPT, or both, are not harmful. For options that require an argu‐
232 ment, each duplication will override the previous argument value.
233
234 General options
235 -C file, --config-file=file
236 Use this user configuration file rather than the default of
237 ~/.manpath.
238
239 -d, --debug
240 Print debugging information.
241
242 -D, --default
243 This option is normally issued as the very first option and
244 resets man's behaviour to its default. Its use is to reset
245 those options that may have been set in $MANOPT. Any options
246 that follow -D will have their usual effect.
247
248 --warnings[=warnings]
249 Enable warnings from groff. This may be used to perform sanity
250 checks on the source text of manual pages. warnings is a comma-
251 separated list of warning names; if it is not supplied, the
252 default is "mac". See the “Warnings” node in info groff for a
253 list of available warning names.
254
255 Main modes of operation
256 -f, --whatis
257 Equivalent to whatis. Display a short description from the man‐
258 ual page, if available. See whatis(1) for details.
259
260 -k, --apropos
261 Equivalent to apropos. Search the short manual page descrip‐
262 tions for keywords and display any matches. See apropos(1) for
263 details.
264
265 -K, --global-apropos
266 Search for text in all manual pages. This is a brute-force
267 search, and is likely to take some time; if you can, you should
268 specify a section to reduce the number of pages that need to be
269 searched. Search terms may be simple strings (the default), or
270 regular expressions if the --regex option is used.
271
272 Note that this searches the sources of the manual pages, not the
273 rendered text, and so may include false positives due to things
274 like comments in source files. Searching the rendered text
275 would be much slower.
276
277 -l, --local-file
278 Activate `local' mode. Format and display local manual files
279 instead of searching through the system's manual collection.
280 Each manual page argument will be interpreted as an nroff source
281 file in the correct format. No cat file is produced. If '-' is
282 listed as one of the arguments, input will be taken from stdin.
283 When this option is not used, and man fails to find the page
284 required, before displaying the error message, it attempts to
285 act as if this option was supplied, using the name as a filename
286 and looking for an exact match.
287
288 -w, --where, --path, --location
289 Don't actually display the manual pages, but do print the loca‐
290 tion(s) of the source nroff files that would be formatted.
291
292 -W, --where-cat, --location-cat
293 Don't actually display the manual pages, but do print the loca‐
294 tion(s) of the cat files that would be displayed. If -w and -W
295 are both specified, print both separated by a space.
296
297 -c, --catman
298 This option is not for general use and should only be used by
299 the catman program.
300
301 -R encoding, --recode=encoding
302 Instead of formatting the manual page in the usual way, output
303 its source converted to the specified encoding. If you already
304 know the encoding of the source file, you can also use man‐
305 conv(1) directly. However, this option allows you to convert
306 several manual pages to a single encoding without having to
307 explicitly state the encoding of each, provided that they were
308 already installed in a structure similar to a manual page hier‐
309 archy.
310
311 Finding manual pages
312 -L locale, --locale=locale
313 man will normally determine your current locale by a call to the
314 C function setlocale(3) which interrogates various environment
315 variables, possibly including $LC_MESSAGES and $LANG. To tempo‐
316 rarily override the determined value, use this option to supply
317 a locale string directly to man. Note that it will not take
318 effect until the search for pages actually begins. Output such
319 as the help message will always be displayed in the initially
320 determined locale.
321
322 -m system[,...], --systems=system[,...]
323 If this system has access to other operating system's manual
324 pages, they can be accessed using this option. To search for a
325 manual page from NewOS's manual page collection, use the option
326 -m NewOS.
327
328 The system specified can be a combination of comma delimited
329 operating system names. To include a search of the native oper‐
330 ating system's manual pages, include the system name man in the
331 argument string. This option will override the $SYSTEM environ‐
332 ment variable.
333
334 -M path, --manpath=path
335 Specify an alternate manpath to use. By default, man uses man‐
336 path derived code to determine the path to search. This option
337 overrides the $MANPATH environment variable and causes option -m
338 to be ignored.
339
340 A path specified as a manpath must be the root of a manual page
341 hierarchy structured into sections as described in the man-db
342 manual (under "The manual page system"). To view manual pages
343 outside such hierarchies, see the -l option.
344
345 -S list, -s list, --sections=list
346 List is a colon- or comma-separated list of `order specific'
347 manual sections to search. This option overrides the $MANSECT
348 environment variable. (The -s spelling is for compatibility
349 with System V.)
350
351 -e sub-extension, --extension=sub-extension
352 Some systems incorporate large packages of manual pages, such as
353 those that accompany the Tcl package, into the main manual page
354 hierarchy. To get around the problem of having two manual pages
355 with the same name such as exit(3), the Tcl pages were usually
356 all assigned to section l. As this is unfortunate, it is now
357 possible to put the pages in the correct section, and to assign
358 a specific `extension' to them, in this case, exit(3tcl). Under
359 normal operation, man will display exit(3) in preference to
360 exit(3tcl). To negotiate this situation and to avoid having to
361 know which section the page you require resides in, it is now
362 possible to give man a sub-extension string indicating which
363 package the page must belong to. Using the above example, sup‐
364 plying the option -e tcl to man will restrict the search to
365 pages having an extension of *tcl.
366
367 -i, --ignore-case
368 Ignore case when searching for manual pages. This is the
369 default.
370
371 -I, --match-case
372 Search for manual pages case-sensitively.
373
374 --regex
375 Show all pages with any part of either their names or their
376 descriptions matching each page argument as a regular expres‐
377 sion, as with apropos(1). Since there is usually no reasonable
378 way to pick a "best" page when searching for a regular expres‐
379 sion, this option implies -a.
380
381 --wildcard
382 Show all pages with any part of either their names or their
383 descriptions matching each page argument using shell-style wild‐
384 cards, as with apropos(1) --wildcard. The page argument must
385 match the entire name or description, or match on word bound‐
386 aries in the description. Since there is usually no reasonable
387 way to pick a "best" page when searching for a wildcard, this
388 option implies -a.
389
390 --names-only
391 If the --regex or --wildcard option is used, match only page
392 names, not page descriptions, as with whatis(1). Otherwise, no
393 effect.
394
395 -a, --all
396 By default, man will exit after displaying the most suitable
397 manual page it finds. Using this option forces man to display
398 all the manual pages with names that match the search criteria.
399
400 -u, --update
401 This option causes man to perform an `inode level' consistency
402 check on its database caches to ensure that they are an accurate
403 representation of the filesystem. It will only have a useful
404 effect if man is installed with the setuid bit set.
405
406 --no-subpages
407 By default, man will try to interpret pairs of manual page names
408 given on the command line as equivalent to a single manual page
409 name containing a hyphen or an underscore. This supports the
410 common pattern of programs that implement a number of subcom‐
411 mands, allowing them to provide manual pages for each that can
412 be accessed using similar syntax as would be used to invoke the
413 subcommands themselves. For example:
414
415 $ man -aw git diff
416 /usr/share/man/man1/git-diff.1.gz
417
418 To disable this behaviour, use the --no-subpages option.
419
420 $ man -aw --no-subpages git diff
421 /usr/share/man/man1/git.1.gz
422 /usr/share/man/man3/Git.3pm.gz
423 /usr/share/man/man1/diff.1.gz
424
425 Controlling formatted output
426 -P pager, --pager=pager
427 Specify which output pager to use. By default, man uses less,
428 falling back to cat if less is not found or is not executable.
429 This option overrides the $MANPAGER environment variable, which
430 in turn overrides the $PAGER environment variable. It is not
431 used in conjunction with -f or -k.
432
433 The value may be a simple command name or a command with argu‐
434 ments, and may use shell quoting (backslashes, single quotes, or
435 double quotes). It may not use pipes to connect multiple com‐
436 mands; if you need that, use a wrapper script, which may take
437 the file to display either as an argument or on standard input.
438
439 -r prompt, --prompt=prompt
440 If a recent version of less is used as the pager, man will
441 attempt to set its prompt and some sensible options. The
442 default prompt looks like
443
444 Manual page name(sec) line x
445
446 where name denotes the manual page name, sec denotes the section
447 it was found under and x the current line number. This is
448 achieved by using the $LESS environment variable.
449
450 Supplying -r with a string will override this default. The
451 string may contain the text $MAN_PN which will be expanded to
452 the name of the current manual page and its section name sur‐
453 rounded by `(' and `)'. The string used to produce the default
454 could be expressed as
455
456 \ Manual\ page\ \$MAN_PN\ ?ltline\ %lt?L/%L.:
457 byte\ %bB?s/%s..?\ (END):?pB\ %pB\\%..
458 (press h for help or q to quit)
459
460 It is broken into three lines here for the sake of readability
461 only. For its meaning see the less(1) manual page. The prompt
462 string is first evaluated by the shell. All double quotes,
463 back-quotes and backslashes in the prompt must be escaped by a
464 preceding backslash. The prompt string may end in an escaped $
465 which may be followed by further options for less. By default
466 man sets the -ix8 options.
467
468 The $MANLESS environment variable described below may be used to
469 set a default prompt string if none is supplied on the command
470 line.
471
472 -7, --ascii
473 When viewing a pure ascii(7) manual page on a 7 bit terminal or
474 terminal emulator, some characters may not display correctly
475 when using the latin1(7) device description with GNU nroff.
476 This option allows pure ascii manual pages to be displayed in
477 ascii with the latin1 device. It will not translate any latin1
478 text. The following table shows the translations performed:
479 some parts of it may only be displayed properly when using GNU
480 nroff's latin1(7) device.
481
482
483 Description Octal latin1 ascii
484 ────────────────────────────────────────
485 continuation 255 ‐ -
486 hyphen
487 bullet (middle 267 · o
488 dot)
489 acute accent 264 ´ '
490 multiplication 327 × x
491 sign
492
493 If the latin1 column displays correctly, your terminal may be
494 set up for latin1 characters and this option is not necessary.
495 If the latin1 and ascii columns are identical, you are reading
496 this page using this option or man did not format this page
497 using the latin1 device description. If the latin1 column is
498 missing or corrupt, you may need to view manual pages with this
499 option.
500
501 This option is ignored when using options -t, -H, -T, or -Z and
502 may be useless for nroff other than GNU's.
503
504 -E encoding, --encoding=encoding
505 Generate output for a character encoding other than the default.
506 For backward compatibility, encoding may be an nroff device such
507 as ascii, latin1, or utf8 as well as a true character encoding
508 such as UTF-8.
509
510 --no-hyphenation, --nh
511 Normally, nroff will automatically hyphenate text at line breaks
512 even in words that do not contain hyphens, if it is necessary to
513 do so to lay out words on a line without excessive spacing.
514 This option disables automatic hyphenation, so words will only
515 be hyphenated if they already contain hyphens.
516
517 If you are writing a manual page and simply want to prevent
518 nroff from hyphenating a word at an inappropriate point, do not
519 use this option, but consult the nroff documentation instead;
520 for instance, you can put "\%" inside a word to indicate that it
521 may be hyphenated at that point, or put "\%" at the start of a
522 word to prevent it from being hyphenated.
523
524 --no-justification, --nj
525 Normally, nroff will automatically justify text to both margins.
526 This option disables full justification, leaving justified only
527 to the left margin, sometimes called "ragged-right" text.
528
529 If you are writing a manual page and simply want to prevent
530 nroff from justifying certain paragraphs, do not use this
531 option, but consult the nroff documentation instead; for
532 instance, you can use the ".na", ".nf", ".fi", and ".ad"
533 requests to temporarily disable adjusting and filling.
534
535 -p string, --preprocessor=string
536 Specify the sequence of preprocessors to run before nroff or
537 troff/groff. Not all installations will have a full set of pre‐
538 processors. Some of the preprocessors and the letters used to
539 designate them are: eqn (e), grap (g), pic (p), tbl (t), vgrind
540 (v), refer (r). This option overrides the $MANROFFSEQ environ‐
541 ment variable. zsoelim is always run as the very first pre‐
542 processor.
543
544 -t, --troff
545 Use groff -mandoc to format the manual page to stdout. This
546 option is not required in conjunction with -H, -T, or -Z.
547
548 -T[device], --troff-device[=device]
549 This option is used to change groff (or possibly troff's) output
550 to be suitable for a device other than the default. It implies
551 -t. Examples (provided with Groff-1.17) include dvi, latin1,
552 ps, utf8, X75 and X100.
553
554 -H[browser], --html[=browser]
555 This option will cause groff to produce HTML output, and will
556 display that output in a web browser. The choice of browser is
557 determined by the optional browser argument if one is provided,
558 by the $BROWSER environment variable, or by a compile-time
559 default if that is unset (usually lynx). This option implies
560 -t, and will only work with GNU troff.
561
562 -X[dpi], --gxditview[=dpi]
563 This option displays the output of groff in a graphical window
564 using the gxditview program. The dpi (dots per inch) may be 75,
565 75-12, 100, or 100-12, defaulting to 75; the -12 variants use a
566 12-point base font. This option implies -T with the X75,
567 X75-12, X100, or X100-12 device respectively.
568
569 -Z, --ditroff
570 groff will run troff and then use an appropriate post-processor
571 to produce output suitable for the chosen device. If groff
572 -mandoc is groff, this option is passed to groff and will sup‐
573 press the use of a post-processor. It implies -t.
574
575 Getting help
576 -?, --help
577 Print a help message and exit.
578
579 --usage
580 Print a short usage message and exit.
581
582 -V, --version
583 Display version information.
584
586 0 Successful program execution.
587
588 1 Usage, syntax or configuration file error.
589
590 2 Operational error.
591
592 3 A child process returned a non-zero exit status.
593
594 16 At least one of the pages/files/keywords didn't exist or wasn't
595 matched.
596
598 MANPATH
599 If $MANPATH is set, its value is used as the path to search for
600 manual pages.
601
602 MANROFFOPT
603 The contents of $MANROFFOPT are added to the command line every
604 time man invokes the formatter (nroff, troff, or groff).
605
606 MANROFFSEQ
607 If $MANROFFSEQ is set, its value is used to determine the set of
608 preprocessors to pass each manual page through. The default
609 preprocessor list is system dependent.
610
611 MANSECT
612 If $MANSECT is set, its value is a colon-delimited list of sec‐
613 tions and it is used to determine which manual sections to
614 search and in what order. The default is "1 1p 8 2 3 3p 3pm 4 5
615 6 7 9 0p n l p o 1x 2x 3x 4x 5x 6x 7x 8x", unless overridden by
616 the SECTION directive in /etc/man_db.conf.
617
618 MANPAGER, PAGER
619 If $MANPAGER or $PAGER is set ($MANPAGER is used in preference),
620 its value is used as the name of the program used to display the
621 manual page. By default, less is used, falling back to cat if
622 less is not found or is not executable.
623
624 The value may be a simple command name or a command with argu‐
625 ments, and may use shell quoting (backslashes, single quotes, or
626 double quotes). It may not use pipes to connect multiple com‐
627 mands; if you need that, use a wrapper script, which may take
628 the file to display either as an argument or on standard input.
629
630 MANLESS
631 If $MANLESS is set, its value will be used as the default prompt
632 string for the less pager, as if it had been passed using the -r
633 option (so any occurrences of the text $MAN_PN will be expanded
634 in the same way). For example, if you want to set the prompt
635 string unconditionally to “my prompt string”, set $MANLESS to
636 ‘-Psmy prompt string’. Using the -r option overrides this envi‐
637 ronment variable.
638
639 BROWSER
640 If $BROWSER is set, its value is a colon-delimited list of com‐
641 mands, each of which in turn is used to try to start a web
642 browser for man --html. In each command, %s is replaced by a
643 filename containing the HTML output from groff, %% is replaced
644 by a single percent sign (%), and %c is replaced by a colon (:).
645
646 SYSTEM If $SYSTEM is set, it will have the same effect as if it had
647 been specified as the argument to the -m option.
648
649 MANOPT If $MANOPT is set, it will be parsed prior to man's command line
650 and is expected to be in a similar format. As all of the other
651 man specific environment variables can be expressed as command
652 line options, and are thus candidates for being included in
653 $MANOPT it is expected that they will become obsolete. N.B.
654 All spaces that should be interpreted as part of an option's
655 argument must be escaped.
656
657 MANWIDTH
658 If $MANWIDTH is set, its value is used as the line length for
659 which manual pages should be formatted. If it is not set, man‐
660 ual pages will be formatted with a line length appropriate to
661 the current terminal (using the value of $COLUMNS, an ioctl(2)
662 if available, or falling back to 80 characters if neither is
663 available). Cat pages will only be saved when the default for‐
664 matting can be used, that is when the terminal line length is
665 between 66 and 80 characters.
666
667 MAN_KEEP_FORMATTING
668 Normally, when output is not being directed to a terminal (such
669 as to a file or a pipe), formatting characters are discarded to
670 make it easier to read the result without special tools. How‐
671 ever, if $MAN_KEEP_FORMATTING is set to any non-empty value,
672 these formatting characters are retained. This may be useful
673 for wrappers around man that can interpret formatting charac‐
674 ters.
675
676 MAN_KEEP_STDERR
677 Normally, when output is being directed to a terminal (usually
678 to a pager), any error output from the command used to produce
679 formatted versions of manual pages is discarded to avoid inter‐
680 fering with the pager's display. Programs such as groff often
681 produce relatively minor error messages about typographical
682 problems such as poor alignment, which are unsightly and gener‐
683 ally confusing when displayed along with the manual page. How‐
684 ever, some users want to see them anyway, so, if
685 $MAN_KEEP_STDERR is set to any non-empty value, error output
686 will be displayed as usual.
687
688 LANG, LC_MESSAGES
689 Depending on system and implementation, either or both of $LANG
690 and $LC_MESSAGES will be interrogated for the current message
691 locale. man will display its messages in that locale (if avail‐
692 able). See setlocale(3) for precise details.
693
695 /etc/man_db.conf
696 man-db configuration file.
697
698 /usr/share/man
699 A global manual page hierarchy.
700
701 /usr/share/man/index.(bt|db|dir|pag)
702 A traditional global index database cache.
703
704 /var/cache/man/index.(bt|db|dir|pag)
705 An FHS compliant global index database cache.
706
708 apropos(1), groff(1), less(1), manpath(1), nroff(1), troff(1),
709 whatis(1), zsoelim(1), setlocale(3), manpath(5), ascii(7), latin1(7),
710 man(7), catman(8), mandb(8), the man-db package manual, FSSTND
711
713 1990, 1991 – Originally written by John W. Eaton (jwe@che.utexas.edu).
714
715 Dec 23 1992: Rik Faith (faith@cs.unc.edu) applied bug fixes supplied by
716 Willem Kasdorp (wkasdo@nikhefk.nikef.nl).
717
718 30th April 1994 – 23rd February 2000: Wilf. (G.Wilford@ee.surrey.ac.uk)
719 has been developing and maintaining this package with the help of a few
720 dedicated people.
721
722 30th October 1996 – 30th March 2001: Fabrizio Polacco <fpo‐
723 lacco@debian.org> maintained and enhanced this package for the Debian
724 project, with the help of all the community.
725
726 31st March 2001 – present day: Colin Watson <cjwatson@debian.org> is
727 now developing and maintaining man-db.
728
729
730
7312.8.4 2018-07-27 MAN(1)