Where are man pages installed in ubuntu?

I’ve searched the title of this post on google in countless variations like “where are man pages present”, “where are man pages installed”, “man pages”+directory-”how to” etc., but I never got what I wanted to see.

So here goes: man pages are installed in the directory “/usr/local/man”.

In this directory, there are several more directories called man1, man2, man3 and so on upto man8.

Quoting the manual page for man, here’s what each of them stores:

1   Executable programs or shell commands
2   System calls (functions provided by the kernel)
3   Library calls (functions within program libraries)
4   Special files (usually found in /dev)
5   File formats and conventions eg /etc/passwd
6   Games
7   Miscellaneous (including macro  packages  and  convenâ
tions), e.g. man(7), groff(7)
8   System administration commands (usually only for root)
9   Kernel routines [Non standard]

To install most of the required man pages on ubuntu, just execute this command:

sudo apt-get install manpages manpages-dev manpages-posix manpages-posix-dev

In case you want to install STL library man pages too, type

sudo apt-get install libstdc++6-4.2-doc

Now to see documentation about vector, just type

man std::vector

NOTE: Its not “man vector”!

That’s all folks!

4 comments so far

  1. srikrishnadas on

    You could have used `whereis man` on your shell.

    • jrharshath on

      no… `whereis man` will give me /bin/man or /usr/bin/man: the location of the man binary, not the location of the man pages themselves.

  2. deepesh on

    I want to ask where are the repositries of installed packages located..

  3. jrharshath on

    @deepesh

    Whenever APT downloads packages to install, they are stored in /var/cache/apt/archives.

    Incomplete packages downloads are stored in /var/cache/apt/archives/partial.

    If you need to clear this cache, just:
    “sudo apt-get clean”

    more details here: http://tombuntu.com/index.php/2008/08/01/free-disk-space-from-apts-cache/


Leave a reply