Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I hope my question isn't too trivial, but I've never actually needed to know this before.

In which directory can I find the files of the man pages, i.e. the read-only text file opened when you type man foo? I assume different distros may keep them in slightly different places, so if it makes any difference I run Ubuntu 10.04.

share|improve this question
add comment

2 Answers

up vote 14 down vote accepted

Use manpath to see the directories used by your system, and man -wa foo to find a specific manual page of foo.

The standard location is /usr/share/man according to Filesystem Hierarchy Standard, and /usr/man is usually a symlink to that directory.

Other locations can be defined in /etc/manpath.config or /etc/man_db.conf (exact location varies). For example, /usr/local/share/man is almost always included.

In addition, man tries to find manual pages for every directory specified in $PATH – for example, if you added /opt/plan9/bin to $PATH, man will automatically search /opt/plan9/man and /opt/plan9/bin/man.

If the $MANPATH environment variable is set, however, it will override all other sources.

share|improve this answer
add comment

They should be under /usr/share/man.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.