How do I install a man page file system-wide?
For example, if I have a man page file examplecommand.1
, how do I install it so that I can just type man examplecommand
to view it?
command linemanpage
How do I install a man page file system-wide?
For example, if I have a man page file examplecommand.1
, how do I install it so that I can just type man examplecommand
to view it?
Best Answer
First, find out which section your man page belongs to. If its a command, it probably belongs to section
1
. You can read the manpage for theman
command to see a description of the different sections and their corresponding numbers.Copy your man page to
/usr/local/share/man/man1/
(change1
to your section number if need be). You can also install it to/usr/share/man/man1/
, but it's best practise to use thelocal
directory for files that are installed without using the APT package manager:Run the
mandb
command. This will updateman
's internal database:That's it! You should be able to view the man page by running:
References:
man
commandmandb
command/usr/bin/dh_installman
if you can read Perl, installed with thedebhelper
package.