Mac OS X

Adding Man Pages

There are a number of man pages in Mac OS X that don’t show up when you type man followed by the command – especially if you’ve gone and started bolting new open source software onto your OS that keeps its man page in its own directory structure.  If you have the path to a directory of man pages then you can view these using the man command easily once you add it to your MANPATH.  The MANPATH is an environment variable that can be set by editing a users .bash_profile directory.  Simply add the directory you’d like to scan in a new line that starts with MANPATH=.  For example if you had a bunch of man pages located in the man directory of your home folder, the following command would include them in your MANPATH:

MANPATH=~/man

If you want to undo this change, you can always just remove the offending line.  If you have multiple items, then like PHPs includes the will be separated by a :