man command not found. Install Man command on Linux Server

man command not found. Install Man command on CentOS / Ubuntu Server

 

I got the error ‘bash: man: command not found’ when I was trying to check the manual page of a Linux command.

When you check manual page of a command it will show NAME, SYNOPSIS, DESCRIPTION, OPTIONS, OPERANDS, STDIN, INPUT FILES, ENVIRONMENT VARIABLES, STDOUT, STDERR, OUTPUT FILES, APPLICATION USAGE, EXAMPLES, SEE ALSO etc.

 

Man command usage

Run the command ‘man [command_name]’ to see the manual page of the linux command

Example :

# man ls

 

Steps to install man on CentOS / Redhat server

 

1. Log into your Centos / RHEL server as ‘root’ user

2. Run the command ‘yum install man-db man-pages’ to install man

3. After installing ‘man’ type the command “man –help” to see the usage

 

Install man on Ubuntu / Debian Server

 

1. You must log into your Ubuntu / Debian server as ‘root’ user or as any user with sudo privilege

2. First you must run ‘apt-get update’ command to update all package list

command :

# apt-get update

3. Run the command ‘apt-get install man’ to install man on server

command :

apt-get install man