Linux

Where Are Linux Man Pages Stored?

The man page hierarchy by section on Linux, and how MANPATH and config extend it.

Last updated

Man pages live compressed as nroff sources under /usr/share/man, sorted by section: man1 commands, man2 syscalls, man3 library calls, through man8 admin tools (plus man9 kernel and locale trees). The .gz suffix is normal, not corruption; read with man, locate with man -w, dump raw with zcat.

Extra hierarchies (/usr/local/share/man, /opt trees) join via MANPATH or the man_db config (manpath.config on some distros), and an exported MANPATH overrides config entirely. Check the effective search path with manpath. Installing into the system tree needs root; formatting any single file works with man on its path.

Where Linux stores this, by platform

Linux
/usr/share/man/

Sections man1..man8 (plus man9, locale subdirs); files like man1/ls.1.gz. Supplements in /usr/local/share/man and /opt/*/share/man. Config /etc/manpath.config or man_db.conf (distro dependent); MANPATH env overrides. Inspect with manpath and echo $MANPATH.

Frequently asked questions

Why is there no man page for my /usr/local tool?

Its hierarchy is not on the search path. Add /usr/local/share/man via MANPATH or the man_db config (MANPATH_MAP entries), then confirm with man -w toolname.

Are .gz man files broken?

No, compression is standard. man reads them transparently; use zcat to view raw source or man /path/file.gz to format a single file directly.

Notice an outdated path? Let us know.