I have installed a minimal Debian 9 through CD image. I configured Apt to not install recommended packages and now the system don't have any man page.

man apt-get, man mkdir, or man ping doesn't show any man page; instead, I get

bash: man: command not found

3 Answers 3

bash: man: command not found

means that you need to install the man-db package.

Manpages are installed by default in most cases, because Debian policy strongly encourages them to be shipped in the same package as the commands themselves:

Each program, utility, and function should have an associated manual page included in the same package.

  • 1
    Sure, but there is any reason why Debian 9 doesn't ship with man-db (and hence man) installed by default?
    – Pablo A
    Jan 31, 2019 at 4:37
  • @Pablo what makes you think it doesn’t? The OP explicitly performed a minimal install and configured apt to ignore “Recommends”. That’s not the default installation. man-db is “Priority: standard” and installed in the default installation, but not in the minimal one. Jan 31, 2019 at 5:21
  • 2
    OK, so Digital Ocean Debian default droplet (at least with 9.6 x64) installation is a minimal one.
    – Pablo A
    Jan 31, 2019 at 5:27

The apt package which contain apt-get, also contains the manpage for apt-get (it even contains it in 7 languages), so if you have apt-get installed, you really should have the manpage. If you don't you've messed up your system in a way beyond what any packaging system can help you with.

Similar can be said for mkdir in the coreutils package, and for ping in iputils-ping.

But configuring APT to not install recommends (which I also always do, and believe to be a good thing), will mean that you don't get manpages of any program where the Debian developer making the package has chosen not to include it in the package, but in a package that is only a recommandation. I guess there's a lot of options, but some number of programs have manpages in the manpages package.

  • Manpages are supposed to be shipped in the package alongside the command they document. The manpages package does document some commands, but only a small number. Other packages which don’t include manpages tend to do so for licensing reasons (e.g. gcc). Apr 1, 2018 at 12:02

FWIW if you try and install Debian under Windows using WSL, then you do not get the man pages as default (I imagine this may also be a minimal installation). This is easily remedied using the method that Stephen Kitt suggests in a previous answer, but for the avoidance of doubt the command is:

sudo apt-get install man-db

If you install the build-essential packages (e.g. to install a C compiler), then you MAY need to also use:

sudo apt-get install manpages-dev

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.