I've just built (from source) a current version (ver 2.1) of libgpiod on my RPi 4B. There are six (6) "command-line tools" included in the source tarball for libgpiod. During the make install process, these tools - and their new man pages - were installed in sub-folders under /usr/lib/arm-linux-gnueabihf.

  • man pages: ./share/man/man1
  • binary exe tools: ./bin

I did not un-install the existing libgpiod package from my system. For now (until I figure out whether or not to keep ver 2.1, or an up-to-date package is released), I'm creating symlinks in /usr/bin pointing to the new tools in /usr/lib/arm-linux-gnueabihf/bin. But I'm unclear on how to handle the manuals. I want to see the new man pages; e.g. when I enter man gpioset, I want to see the man page in /usr/lib/arm-linux-gnueabihf/share/man/man1/gpioset.1.

As RPi OS is a Debian derivative, I'd expect that manuals were installed IAW Debian convention (whatever that might be). I did run a whereis against the name of one of the 6 command line tools, and got the following:

$ whereis gpioinfo
gpioinfo: /usr/bin/gpioinfo /usr/bin/gpioinfo.old /usr/share/man/man1/gpioinfo.1.gz

And I find all 6 manuals in /usr/share/man/man1 (as "gzip"-compressed files). I suppose one way to make the substitution of "new-for-old" man pages would be to move (mv) the old manuals, and put links to the new ones in their place. But I was hoping for something more elegant than that - perhaps a "one-liner" somewhere that pointed to the location of the new manuals in /usr/lib/arm-linux-gnueabihf/share/man/man1. Is there such a one-liner?

Is there a way to set this up on an ad-hoc basis - until the new libgpiod package is released?

1 Answer 1


There are a number of different options, depending on the precise version of man that you have installed. So far I have identified configuration files named /etc/man.conf, /etc/man_db.conf, /etc/manpath.config. Fortunately, the one you need should be referenced from man man, and may be further described by name (for example, man man.conf). However, you shouldn't need to edit those yourself and here are two suggestions, depending on whether you need the man pages to be accessible by multiple users or really just yourself:

  1. Put your man pages in the correctly named directory under a known system location. For local installations this would typically be /usr/local/share/man. So you would move or copy the files from your local ./share/man/man1 to the directory /usr/local/share/man/man1.

  2. Set the environment variable MANPATH to a colon-separated list of directory trees to search for manual pages. The slightly complicating factor here is to know the original search path, and on some systems you can run manpath (or maybe manpath -g) to obtain this value.

    Here are a couple of suggestions that should work, with the first being preferred:

  • "There is a manpath configuration entry that will allow you to specify your new man pages directory before the system ones". I'm sorry, but after reading man 5 manpath, man manpath and /etc/manpath.config, I'm just not seeing how to selectively alter the manpath for the 6 tools I asked about.
    – Seamus
    Dec 18, 2023 at 7:36
  • @Seamus there you go, examples added Dec 18, 2023 at 9:14
  • MANPATH is created by you, so until you set it, it won't exist Dec 19, 2023 at 7:43

You must log in to answer this question.

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