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!

7 thoughts on “Where are man pages installed in ubuntu?

    • 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.

  1. Hi,

    I am getting the following error message, while doing it. Could you please help me?

    :~$ sudo apt-get install manpages manpages-dev
    Reading package lists… Done
    Building dependency tree
    Reading state information… Done
    manpages is already the newest version.
    Package manpages-dev is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source
    E: Package manpages-dev has no installation candidate


  2. It seems on Ubuntu 10.10 at least that the man directory is;


    Your man file also needs to be gzipped and named to the relevant man directory. E.g. my man page is for an executable, so will live in /usr/share/man/man1/

    I had to gzip it and name it file.1.gz

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s