Ivan Tomica

How to include custom man pages in Linux?

Have you ever wondered where man pages are located and can you include some other folder with man pages? Well since I compile Mutt email client from source I have decided to place it in /opt directory so it won’t interfere with system packages and packages from official repositories. When Mutt is configured with --prefix=/opt compile time option it also installs its man pages to /opt/share/man directory.

If you type in man muttrc into your terminal you may find that man won’t find those man pages. You can find where your system reads its man pages from by issuing following command:

manpath

To include them in your system wide “man path” you need to edit following file:

sudo vi /etc/man_db.conf

Just change it to include the following below other MANDATORY_MANPATH variables:

MANDATORY_MANPATH           /opt/share/man

You could of course load that man page manually by man program like this:

man /opt/share/man/man5/muttrc.5

but that is clunky and isn’t very practical when you quickly need to refer to something.

Tagged in:
About 
Sysadmin on the everlasting journey of learning. Always in search for an opportunity to prove myself and to learn something new. My addiction is learning and my main goal is to excel in every aspect of Linux/Unix system administration.

0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *