Fix - bash: man: command not found


Fix bash man command not found

If you are using a Linux distribution such as Ubuntu, CentOS, or Fedora and when you run man command you get bash: man: command not found, the most common reason is man pages are not installed.

How to install man package on Linux

Based on which Linux Distribution you are using make use of the package manager to install man

Red Hat (REHL) - CentOS/Fedora:

# yum install man

# dnf install man


Ubuntu/Debian:

# apt install man


Alpine Linux:

# apk add man



Example:
# yum install man

....

=================================================================================
 Package Arch Version Repository Size
=================================================================================
Installing:
 man-db                         aarch64                    2.6.3-9.amzn2.0.3                       amzn2-core                    556 k
Installing for dependencies:
 groff-base                     aarch64                    1.22.2-8.amzn2.0.2                      amzn2-core                    939 k
 less                           aarch64                    458-9.amzn2.0.2                         amzn2-core                    121 k
 libpipeline                    aarch64                    1.2.3-3.amzn2.0.2                       amzn2-core                     53 k

Transaction Summary
=================================================================================
Install  1 Package (+3 Dependent packages)

Total download size: 1.6 M
Installed size: 6.5 M
Is this ok [y/d/N]: y
...
Downloading packages:
...
Installed:
  man-db.aarch64 0:2.6.3-9.amzn2.0.3
Complete!

If the man database is installed, try the man command again and it should work,

# man ls

LS(1) User Commands LS(1)

NAME
       ls - list directory contents

SYNOPSIS
       ls [OPTION]... [FILE]...
-


Have Questions? Post them here!

Topics Coverage:


🎉 We are celebrating the 10th years of Code2care! Thank you for all your support!

We strongly support Gender Equality & Diversity.

Follow Us: GitHub | Facebook | Twitter | Instagram