manpath
Display manual page search path
TLDR
Display the search path used to find man pages
Show the entire global manpath
SYNOPSIS
manpath [-qgd] [-m system] [-C file]
PARAMETERS
-q
Quiet mode; suppresses error messages.
-d
Display the global system manual path. This can be helpful for understanding the default search locations.
-g
Display the global system manual path suitable for use in crontab (without user-specific directories).
-m system
Specify an alternate system for manual pages. This is useful on systems where multiple operating systems are installed.
-C file
Specify the configuration file to use instead of the default /etc/manpath.config.
DESCRIPTION
The manpath command is used to determine the search path that the man command uses to locate manual pages. It essentially tells man where to look for its documentation. Without any arguments, manpath outputs a colon-separated list of directories. This list represents the standard manual page hierarchy, typically including system-wide locations like /usr/share/man and /usr/local/share/man, as well as user-specific locations if configured.
Users can also configure their own manual page paths using environment variables like MANPATH. If the MANPATH variable is set, manpath will prioritize it and incorporate the system default paths. manpath is crucial for administrators and developers who need to ensure that newly installed or custom manual pages are discoverable by the man command. It facilitates effective documentation management and accessibility.
CAVEATS
The output of manpath depends on the system's configuration and the presence of the MANPATH environment variable. Unexpected results may occur if these factors are not considered.
CONFIGURATION FILES
manpath typically relies on /etc/manpath.config to determine the system's default manual page paths. This file can be customized to add or remove directories from the search path. Each line of the file typically specifies a 'MANDATORY_MANPATH' directory.