When I build some source in custom location, i.e.:

configure --prefix=$HOME/.local

and then, make install..., man pages are copied in ~/.local/share/man/ but inaccessible from man command

How can I make man recognise pages in my custom location?

1 Answer 1


For one-off manpage reading, just point man at the specific file:

man ~/.local/share/man/manX/manpage.1.gz

Otherwise, if you want to always check ~/.local/share, then set the MANPATH environment variable for your user session (typically in your .bashrc file). To check what the current MANPATH is, do:


you'll probably want to append :$HOME/local/.share/man to the end of that.

  • Thanks. Interestingly MANPATH has already $HOME/.local/man but not $HOME/.local/share/man. I added export MANPATH=$HOME/.local/share/man:$MANPATH in .bashrc
    – zetah
    Mar 14, 2012 at 6:21
  • running manpath --debug shows that it tries to add for every path entry the path one step down with man and share/man and adds them to the path if the folder exists. So e.g. if you have $HOME/.local/bin in path (which seems to be some kind of default nowadays?), I can get $HOME/.local/man and $HOME/.local/share/man added, if these folders exist.
    – Jan Katins
    Aug 27, 2022 at 21:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .