Where is the latest source code of man command for linux?
Solution 1
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
man-db-2.6.7.1-16.fc21.x86_64
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.
Solution 2
On Debian based distributions, same like Ubuntu, you can find and download source code like below:
$ which man
/usr/bin/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.
Related videos on Youtube
CodyChan
Updated on September 18, 2022Comments
-
CodyChan over 1 year
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
, notman-pages
but the binary file in/usr/bin/man
itself which can be compiled and installed. -
CodyChan over 8 yearsThanks, 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.
-
fpmurphy over 8 yearsThat 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.
-
schily over 8 yearsIf 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.
-
Stéphane Chazelas over 8 yearsIf
rpm -qf
ordpkg -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. -
schily over 8 yearsThere 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.
-
Tim over 6 yearsFor future reference, on Debian based distributions the equivalent commands are
dpkg -S /usr/bin/man
andapt-cache show man-db | grep Homepage
-
Aaron Hall almost 6 yearsThanks, this helped me. Would be nice if this answer could be somehow more generalized.