MANPATH environment variable is set,
man very "helpfully" ignores the default search path, as defined in
/etc/manpath.config. Is there any way add a path or paths to that searched by
It depends on the
man implementation, but since you have
/etc/manpath.config I'm guessing that you're using a Debian-derived system with man-db.
In that case, manpath(1) describes what you can do here (and the same approach will work for man(1)):
If $MANPATH is prefixed by a colon, then the value of the variable is appended to the list determined from the content of the configuration files. If the colon comes at the end of the value in the variable, then the determined list is appended to the content of the variable. If the value of the variable contains a double colon (::), then the determined list is inserted in the middle of the value, between the two colons.
Depending on the particular implementation of
man, you may augment the value of
MANPATH in different ways.
On Linux systems, set
MANPATH to the value of
export MANPATH="$(manpath -g):/new/path/man"
or create an alias like
alias man='man -M "$(manpath -g):/new/path/man"'
On FreeBSD, do as above, but drop the
On OpenBSD and NetBSD, use
alias man='man -m /new/path/man'
Consult the manual for the
man utility on your Unix.
You can use
manpath to build the current
MANPATH and append the new path. To build the most inclusive path for your system, use the
export MANPATH=$(MANPATH= manpath -g):/new/man/path
manpath with an empty
MANPATH ensures it ignores any current value of