HomeUNIXControl which Man Pages are Available in sh with MANPATH

Control which Man Pages are Available in sh with MANPATH

Using the MANPATH environment variable, you can select which man page directories are searched when using man or apropos. This recipe describes changing your MANPATH variable when using the Bourne shell.


If you have added software with its own man page directory, such as /usr/local/software/man, you can add this to your personal MANPATH variable so that those man pages will be available to man. The technique for changing this variable depends on your shell.

If you are using the Bourne shell (sh), you must edit the file .profile in your home directory (You can use the shortcut ~/.profile to refer to this.). If this file already contains a MANPATH declaration, you can add the new path by adding:

:/usr/local/software/man

to the end of the line so that it looks something like the following:

MANPATH=/usr/man:/usr/local/man:/usr/local/software/man

If your Bourne shell .profile doesn’t have a MANPATH directive, you can create one by adding these lines to .profile:

MANPATH=/usr/local/software/man
export MANPATH

Quinn McHenry
Quinn McHenry
Quinn was one of the original co-founders of Tech-Recipes. He is currently crafting iOS applications as a senior developer at Small Planet Digital in Brooklyn, New York.
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -

Most Popular

Recent Comments

Cleveland Furia on How to Clear Google Activity
Sid Wohlfarth on How to Clear Google Activity
Riley Magsayo on How to Clear Google Activity
สมัครรับเครดิตฟรี ทันที on How to improve Remote Desktop Protocol Performance
Neal Wangstad on How to Clear Google Activity
Slavcho Andov on How to install Ubuntu
Slavcho Andov on How to fix bad sectors
Sheraz Ali on How to Backup Android