1MANPATH(5) /etc/man_db.conf MANPATH(5)
2
3
4
6 manpath - format of the /etc/man_db.conf file
7
9 The manpath configuration file is used by the manual page utilities to
10 assess users' manpaths at run time, to indicate which manual page hier‐
11 archies (manpaths) are to be treated as system hierarchies and to as‐
12 sign them directories to be used for storing cat files.
13
14 If the environment variable $MANPATH is already set, the information
15 contained within /etc/man_db.conf will not override it.
16
18 By default, man-db examines the user's $PATH. For each path_element
19 found there, it adds manpath_element to the search path.
20
21 If there is no MANPATH_MAP line in the configuration file for a given
22 path_element, then it adds all of path_element/../man, path_ele‐
23 ment/man, path_element/../share/man, and path_element/share/man that
24 exist as directories to the search path.
25
26 It then adds any MANDATORY_MANPATH entries from the configuration file
27 to the search path.
28
29 Finally, if the --systems option is used or the $SYSTEM environment
30 variable is set, then that should consist of a sequence of operating
31 system names separated by commas or colons. This acts as a template,
32 expanding the search path once more to allow access to other operating
33 systems' manual pages: for each system name, man-db looks for that name
34 as a subdirectory of each entry in the search path, and adds it to the
35 final search path if it exists. A system name of man inserts the nor‐
36 mal search path without subdirectories. For example, if the search
37 path would otherwise have been /usr/share/man:/usr/local/man, and $SYS‐
38 TEM is set to newOS:man, then the final search path will be
39 /usr/share/man/newOS:/usr/share/man:/usr/local/man/newOS:/usr/lo‐
40 cal/man.
41
42 The $MANPATH environment variable overrides man-db's default manual
43 page search paths. Most users should not need to set it. Its syntax
44 is similar to the $PATH environment variable: it consists of a sequence
45 of directory names separated by colons. It overrides the default
46 search path described above.
47
48 If the value of $MANPATH starts with a colon, then the default search
49 path is added at its start. If the value of $MANPATH ends with a
50 colon, then the default search path is added at its end. If the value
51 of $MANPATH contains a double colon (::), then the default search path
52 is inserted in the middle of the value, between the two colons.
53
55 The following field types are currently recognised:
56
57 # comment
58 Blank lines or those beginning with a # will be treated as com‐
59 ments and ignored.
60
61 MANDATORY_MANPATH manpath_element
62 Lines of this form indicate manpaths that every automatically
63 generated $MANPATH should contain. This will typically include
64 /usr/man.
65
66 MANPATH_MAP path_element manpath_element
67 Lines of this form set up $PATH to $MANPATH mappings. For each
68 path_element found in the user's $PATH, manpath_element will be
69 added to the $MANPATH.
70
71 MANDB_MAP manpath_element [ catpath_element ]
72 Lines of this form indicate which manpaths are to be treated as
73 system manpaths, and optionally where their cat files should be
74 stored. This field type is particularly important if man is a
75 setuid program, as (when in the system configuration file
76 /etc/man_db.conf rather than the per-user configuration file
77 .manpath) it indicates which manual page hierarchies to access
78 as the setuid user and which as the invoking user.
79
80 The system manual page hierarchies are usually those stored un‐
81 der /usr such as /usr/man, /usr/local/man and /usr/X11R6/man.
82
83 If cat pages from a particular manpath_element are not to be
84 stored or are to be stored in the traditional location, cat‐
85 path_element may be omitted.
86
87 Traditional cat placement would be impossible for read only
88 mounted manual page hierarchies and because of this it is possi‐
89 ble to specify any valid directory hierarchy for their storage.
90 To observe the Linux FSSTND the keyword FSSTND can be used in
91 place of an actual directory.
92
93 Unfortunately, it is necessary to specify all system man tree
94 paths, including alternate operating system paths such as
95 /usr/man/sun and any NLS locale paths such as
96 /usr/man/de_DE.88591.
97
98 As the information is parsed line by line in the order written,
99 it is necessary for any manpath that is a sub-hierarchy of an‐
100 other hierarchy to be listed first, otherwise an incorrect match
101 will be made. An example is that /usr/man/de_DE.88591 must come
102 before /usr/man.
103
104 DEFINE key value
105 Lines of this form define miscellaneous configuration variables;
106 see the default configuration file for those variables used by
107 the manual pager utilities. They include default paths to vari‐
108 ous programs (such as grep and tbl), and default sets of argu‐
109 ments to those programs.
110
111 SECTION section ...
112 Lines of this form define the order in which manual sections
113 should be searched. If there are no SECTION directives in the
114 configuration file, the default is:
115
116 SECTION 1 n l 8 3 0 2 3type 5 4 9 6 7
117
118 If multiple SECTION directives are given, their section lists
119 will be concatenated.
120
121 If a particular extension is not in this list (say, 1mh) it will
122 be displayed with the rest of the section it belongs to. The
123 effect of this is that you only need to explicitly list exten‐
124 sions if you want to force a particular order. Sections with
125 extensions should usually be adjacent to their main section
126 (e.g. "1 1mh 8 ...").
127
128 SECTIONS is accepted as an alternative name for this directive.
129
130 MINCATWIDTH width
131 If the terminal width is less than width, cat pages will not be
132 created (if missing) or displayed. The default is 80.
133
134 MAXCATWIDTH width
135 If the terminal width is greater than width, cat pages will not
136 be created (if missing) or displayed. The default is 80.
137
138 CATWIDTH width
139 If width is non-zero, cat pages will always be formatted for a
140 terminal of the given width, regardless of the width of the ter‐
141 minal actually being used. This overrides MINCATWIDTH and MAX‐
142 CATWIDTH.
143
144 NOCACHE
145 This flag prevents man(1) from creating cat pages automatically.
146
148 Unless the rules above are followed and observed precisely, the manual
149 pager utilities will not function as desired. The rules are overly
150 complicated.
151
152 https://gitlab.com/man-db/man-db/-/issues
153 https://savannah.nongnu.org/bugs/?group=man-db
154
155
156
1572.11.2 2023-01-08 MANPATH(5)