APT isn't installing man pages by default
Solution 1
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.
Solution 2
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.
Solution 3
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
Related videos on Youtube
Wox ZrinH
Updated on September 18, 2022Comments
-
Wox ZrinH over 1 year
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
, orman ping
doesn't show any man page; instead, I getbash: man: command not found
-
Knud Larsen about 6 years"man pages" are on-line :
man apt-get
linux.die.net/man/8/apt-get or manpages.ubuntu.com/manpages/xenial/man8/apt.8.html ...man mkdir
(1) man7.org/linux/man-pages/man1/mkdir.1.html , etc. etc. -
Stephen Kitt about 6 years@Knud since the OP is using Debian, the appropriate site for online manpages is
manpages.debian.org
.
-
-
Pablo A about 5 yearsSure, but there is any reason why Debian 9 doesn't ship with
man-db
(and henceman
) installed by default? -
Stephen Kitt about 5 years@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. -
Pablo A about 5 yearsOK, so Digital Ocean Debian default droplet (at least with 9.6 x64) installation is a minimal one.