[SOLVED] Bash: Man Command Not Found Error in Arch Linux

I never used Arch Linux before a few days and recently installed it on my laptop. It’s very manual and gives us complete control. But there are numerous errors a newbie like me faces, and ‘Bash: man command not found” was one of them.

At first, it bamboozled me, and I got confused. Whatever I tried in the Terminal, I faced this issue.

Fortunately, my technical mind started working, and I found that it’s an issue with the Pacman Package manager. The simple remedy is to install or reinstall the “Man-db”  package, and the issue will disappear.

Here are the exact steps to fix the “Man Command Not Found” issue in Ubuntu, Fedora and all other popular Linux Distros.

What’s This Issue Exactly?

The ‘Man’ command is a vital command for Linux OS. It helps the users by providing the manuals for each and every command in the OS. The commands are stored in the manuals, that are known as ‘man pages”. As I was facing this error, it was related to the man pages, as the system had no access to these manuals.

There are numerous reasons like the ‘man’ command not being installed, ‘man pages’ not being available, or any other issue that might cause this issue.

How to Fix Bash:man command not found in Linux?

The first step that you all have to do is to open the terminal. You can do that with ” Ctrl + Alt + T” keyboard shortcut to open the same. Type in or copy-paste the following command to know if the ‘man’ package is installed or not.which-man-command-linux

which man

If the man package is installed, you will see the path of “usr/bin/man” as the output. If it’s not installed, then you will see the error.

If the “man” command is not installed, you must install it. The installation process may differ depending on the Linux distribution you are using. Don’t worry; we will share the process for every common distro.

For Ubuntu or Debian Based Distros

First of all, type in the following commands in the Terminal one by one.

sudo apt-get update
sudo apt-get install man-db

man db installation

For Fedora and similar distros:

sudo dnf install man-db

For Red Hat Linux and other distros with Yum Package Manager:

sudo yum install man-db

For Arch Linux Based Distros:

sudo pacman -S man-db

Depending on the distro and the installed package manager, you might have to use the appropriate command to install the ‘man-db’ package. Ensure you are connected to the Internet to let the system install the required packages.

This step will immediately fix the issue for most users. But if you are still facing the issue, it’s a wise decision to install the ‘man-pages’ package. Here are the exact steps to do the same.

Installing Man Pages on Linux

For Ubuntu or Debian Based Distros

sudo apt-get update
sudo apt-get install manpages

For Fedora and similar distros:

sudo dnf install man-pages

For Red Hat Linux and other distros with Yum Package Manager:

sudo yum install man-pages

For Arch Linux Based Distros:

sudo pacman -S man-pages

After this command executes, you need to update the Man Cache. This is an important step, as it automatically fixes the user path and updates the cache files. Just run the following command, and you are all set. This step fixed the issue in my system, and it’d do the same with your system.

sudo mandb

Once done, the issue is resolved. This command scans the system for all the Man pages and updates the cache. You can use the Man command without facing the Bash error.

Conclusion

I was pretty confused when this issue popped up. Fortunately, I had experience with other Linux distros and fixed the Man Pages not found error. I’ve used the Arch Liux for this tutorial, but you can follow these steps for all other common Linux distros without any issues.

This is not a common issue, and I was lucky ( or unlucky? ) to encounter it. If you want some extra help, let me know in the comments below.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *