{
    "mode": "man",
    "parameter": "manpath",
    "section": "5",
    "url": "https://www.chedong.com/phpMan.php/man/manpath/5/json",
    "generated": "2026-09-17T09:30:38Z",
    "sections": {
        "NAME": {
            "content": "manpath - format of the /etc/manpath.config file\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The manpath configuration file is used by the manual page utilities to assess users' manpaths\nat run time, to indicate which manual page hierarchies (manpaths) are to be treated as system\nhierarchies and to assign them directories to be used for storing cat files.\n\nIf  the  environment  variable  $MANPATH  is  already  set,  the information contained within\n/etc/manpath.config will not override it.\n",
            "subsections": []
        },
        "SEARCH PATH": {
            "content": "By default, man-db examines the user's $PATH.  For each pathelement  found  there,  it  adds\nmanpathelement to the search path.\n\nIf  there  is no MANPATHMAP line in the configuration file for a given pathelement, then it\nadds all of pathelement/../man, pathelement/man, pathelement/../share/man,  and  pathele‐\nment/share/man that exist as directories to the search path.\n\nIt then adds any MANDATORYMANPATH entries from the configuration file to the search path.\n\nFinally,  if  the  --systems  option is used or the $SYSTEM environment variable is set, then\nthat should consist of a sequence of operating system names separated by  commas  or  colons.\nThis acts as a template, expanding the search path once more to allow access to other operat‐\ning systems' manual pages: for each system name, man-db looks for that name as a subdirectory\nof  each entry in the search path, and adds it to the final search path if it exists.  A sys‐\ntem name of man inserts the normal search path without subdirectories.  For example,  if  the\nsearch  path  would  otherwise have been /usr/share/man:/usr/local/man, and $SYSTEM is set to\nnewOS:man, then the final search path  will  be  /usr/share/man/newOS:/usr/share/man:/usr/lo‐\ncal/man/newOS:/usr/local/man.\n\nThe  $MANPATH environment variable overrides man-db's default manual page search paths.  Most\nusers should not need to set it.  Its syntax is similar to the $PATH environment variable: it\nconsists of a sequence of directory names separated by  colons.   It  overrides  the  default\nsearch path described above.\n\nIf  the  value  of $MANPATH starts with a colon, then the default search path is added at its\nstart.  If the value of $MANPATH ends with a colon, then the default search path is added  at\nits end.  If the value of $MANPATH contains a double colon (::), then the default search path\nis inserted in the middle of the value, between the two colons.\n",
            "subsections": []
        },
        "FORMAT": {
            "content": "The following field types are currently recognised:\n\n# comment\nBlank lines or those beginning with a # will be treated as comments and ignored.\n\nMANDATORYMANPATH manpathelement\nLines  of  this  form  indicate  manpaths  that every automatically generated $MANPATH\nshould contain.  This will typically include /usr/man.\n\nMANPATHMAP pathelement manpathelement\nLines of this form set up $PATH to $MANPATH mappings.  For each pathelement found  in\nthe user's $PATH, manpathelement will be added to the $MANPATH.\n\nMANDBMAP manpathelement [ catpathelement ]\nLines  of  this form indicate which manpaths are to be treated as system manpaths, and\noptionally where their cat files should be stored.  This field  type  is  particularly\nimportant  if  man  is  a  setuid  program,  as (when in the system configuration file\n/etc/manpath.config rather than the per-user configuration file .manpath) it indicates\nwhich manual page hierarchies to access as the setuid user and which as  the  invoking\nuser.\n\nThe  system  manual  page  hierarchies  are  usually  those  stored under /usr such as\n/usr/man, /usr/local/man and /usr/X11R6/man.\n\nIf cat pages from a particular manpathelement are not to  be  stored  or  are  to  be\nstored in the traditional location, catpathelement may be omitted.\n\nTraditional  cat placement would be impossible for read only mounted manual page hier‐\narchies and because of this it is possible to specify any  valid  directory  hierarchy\nfor  their  storage.   To  observe  the Linux FSSTND the keyword FSSTND can be used in\nplace of an actual directory.\n\nUnfortunately, it is necessary to specify all system man tree paths, including  alter‐\nnate  operating  system  paths  such  as /usr/man/sun and any NLS locale paths such as\n/usr/man/deDE.88591.\n\nAs the information is parsed line by line in the order written, it  is  necessary  for\nany manpath that is a sub-hierarchy of another hierarchy to be listed first, otherwise\nan  incorrect  match  will be made.  An example is that /usr/man/deDE.88591 must come\nbefore /usr/man.\n\nDEFINE key value\nLines of this form define miscellaneous configuration variables; see the default  con‐\nfiguration  file for those variables used by the manual pager utilities.  They include\ndefault paths to various programs (such as grep and tbl), and default  sets  of  argu‐\nments to those programs.\n\nSECTION section ...\nLines  of  this form define the order in which manual sections should be searched.  If\nthere are no SECTION directives in the configuration file, the default is:\n\nSECTION 1 n l 8 3 0 2 3type 5 4 9 6 7\n\nIf multiple SECTION directives are given, their section lists will be concatenated.\n\nIf a particular extension is not in this list (say, 1mh) it will be displayed with the\nrest of the section it belongs to.  The effect of this is that you only  need  to  ex‐\nplicitly  list  extensions if you want to force a particular order.  Sections with ex‐\ntensions should usually be adjacent to their main section (e.g. \"1 1mh 8 ...\").\n\nSECTIONS is accepted as an alternative name for this directive.\n\nMINCATWIDTH width\nIf the terminal width is less than width, cat pages will not be created  (if  missing)\nor displayed.  The default is 80.\n\nMAXCATWIDTH width\nIf  the  terminal width is greater than width, cat pages will not be created (if miss‐\ning) or displayed.  The default is 80.\n\nCATWIDTH width\nIf width is non-zero, cat pages will always be formatted for a terminal of  the  given\nwidth,  regardless  of  the width of the terminal actually being used.  This overrides\nMINCATWIDTH and MAXCATWIDTH.\n\nNOCACHE\nThis flag prevents man(1) from creating cat pages automatically.\n",
            "subsections": []
        },
        "BUGS": {
            "content": "Unless the rules above are followed and observed precisely, the manual pager  utilities  will\nnot function as desired.  The rules are overly complicated.\n\nhttps://gitlab.com/man-db/man-db/-/issues\nhttps://savannah.nongnu.org/bugs/?group=man-db\n\n2.12.0                                       2023-09-23                                   MANPATH(5)",
            "subsections": []
        }
    },
    "summary": "manpath - format of the /etc/manpath.config file",
    "flags": [],
    "examples": [],
    "see_also": []
}