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!

You could have used `whereis man` on your shell.
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.
I want to ask where are the repositries of installed packages located..
@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/
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
~$
Thanks,
thnkx…
It seems on Ubuntu 10.10 at least that the man directory is;
/usr/share/man
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