I'm looking for the latest source code of man command, the version in my Linux is pretty old(v1.6f), but I failed after googling a while.

I mean the latest source code of man, not man-pages but the binary file in /usr/bin/man itself which can be compiled and installed.

  • hey man, did you try man man ?
    – ron
    Commented Oct 9, 2023 at 18:28

4 Answers 4


You can usually query your distribution to see where sources come from. For example, I'm on Fedora, and I can see that the man command comes from the man-db package:

$ rpm -qf /usr/bin/man

I can then query the man-db package for the upstream url:

$ rpm -qi man-db | grep -i url
URL         : http://www.nongnu.org/man-db/

And there you are, http://www.nongnu.org/man-db/.

You can perform a similar sequence of steps with the packaging systems used on other distributions.

  • Thanks, I've already got man-db after I posted this question, it seems I cannot just compile man from the source code because of many dependencies.
    – CodyChan
    Commented Sep 1, 2015 at 5:53
  • That is true. You are going to have to resolve all the dependencies first. even then, your new man binary may not be useful to you because of dependencies on other newer binaries.
    – fpmurphy
    Commented Sep 1, 2015 at 8:18
  • 1
    If there are only linear dependencies, this is easy ;-) There are program systems line GNOME that have circular dependencies. I hope that some OSS developers learn to create sources with documented linear dependencies only.
    – schily
    Commented Sep 1, 2015 at 9:14
  • 1
    For future reference, on Debian based distributions the equivalent commands are dpkg -S /usr/bin/man and apt-cache show man-db | grep Homepage
    – Tim
    Commented Nov 21, 2017 at 18:42

On Debian based distributions, same like Ubuntu, you can find and download source code like below:

$ which man
$ dpkg --search /usr/bin/man
man-db: /usr/bin/man
$ apt-get source man-db

This will put the source code in your current working directory.

  • Thanks, this helped me. Would be nice if this answer could be somehow more generalized.
    – Aaron Hall
    Commented Jun 6, 2018 at 22:35

The source code is now available on GitLab.


Linux is not an operating system but just a kernel. So in theory every distro is free to use whatever they like.

Even rpm is not necessarily used on every linux distro, so the first step is to find out which implementation is used. This can typically be done by using strings on the binary and then use a significant string in double quotes as search string on Google.

  • 1
    If rpm -qf or dpkg -S or the equivalent for your packaging system for `"$(command -v man)" returns the name of a package, then that method is going to be a lot more reliable than googling for strings found in the binary though. Bear in mind that most distributions patch the software from upstream. So the source package for your distribution is the only place to go for the exact source code as compiled for your /usr/bin/man. Commented Sep 1, 2015 at 10:05
  • There are more than a dozen different packaging systems, so you would need to mention many methods..... but you are correct: In general, many distributions are non-collaborative and either patch bugs into the software or do not report useful patches upstream.
    – schily
    Commented Sep 1, 2015 at 10:28

You must log in to answer this question.

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