How to Fix “-bash: man: command not found” on CentOS 6.3

This quick post shows the step to install “man” command on Linux. In linux CentOS 6.2 and CentOS 6.3 operating system, “man” command has not been installed automatically. The Linux command “man” is used to display the manual page for other command and also will help you to explain the functions for the commands that commonly used. The term “man” is short for manual.

If you typed “man” command on the linux server that has not been installed with man command, you will get the following message :

[root@centos63 ~]# man tar
-bash: man: command not found

To install “man“, simply run this command :

[root@centos63 ~]# yum install man -y
Loaded plugins: fastestmirror, presto, priorities
Loading mirror speeds from cached hostfile
 * base: centos.ipserverone.com
 * extras: centos.ipserverone.com
 * updates: centos.ipserverone.com
base                                                                         | 3.7 kB     00:00
extras                                                                       | 3.0 kB     00:00
updates                                                                      | 3.5 kB     00:00
updates/primary_db                                                           | 2.3 MB     00:19
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package man.i686 0:1.6f-30.el6 will be installed
--> Processing Dependency: lzma for package: man-1.6f-30.el6.i686
--> Running transaction check
---> Package xz-lzma-compat.i686 0:4.999.9-0.3.beta.20091007git.el6 will be installed
--> Processing Dependency: xz = 4.999.9-0.3.beta.20091007git.el6 for package: xz-lzma-compat-4.999.9-0.3.beta.20091007git.el6.i686
--> Running transaction check
---> Package xz.i686 0:4.999.9-0.3.beta.20091007git.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package                Arch         Version                                     Repository    Size
====================================================================================================
Installing:
 man                    i686         1.6f-30.el6                                 base         260 k
Installing for dependencies:
 xz                     i686         4.999.9-0.3.beta.20091007git.el6            base         137 k
 xz-lzma-compat         i686         4.999.9-0.3.beta.20091007git.el6            base          16 k

Transaction Summary
====================================================================================================
Install       3 Package(s)

Total download size: 413 k
Installed size: 864 k
Downloading Packages:
Setting up and reading Presto delta metadata
Processing delta metadata
Package(s) data still to download: 413 k
(1/3): man-1.6f-30.el6.i686.rpm                                              | 260 kB     00:01
(2/3): xz-4.999.9-0.3.beta.20091007git.el6.i686.rpm                          | 137 kB     00:00
(3/3): xz-lzma-compat-4.999.9-0.3.beta.20091007git.el6.i686.rpm              |  16 kB     00:00
----------------------------------------------------------------------------------------------------
Total                                                               138 kB/s | 413 kB     00:02
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : xz-4.999.9-0.3.beta.20091007git.el6.i686                                         1/3
  Installing : xz-lzma-compat-4.999.9-0.3.beta.20091007git.el6.i686                             2/3
  Installing : man-1.6f-30.el6.i686                                                             3/3
  Verifying  : xz-4.999.9-0.3.beta.20091007git.el6.i686                                         1/3
  Verifying  : man-1.6f-30.el6.i686                                                             2/3
  Verifying  : xz-lzma-compat-4.999.9-0.3.beta.20091007git.el6.i686                             3/3

Installed:
  man.i686 0:1.6f-30.el6

Dependency Installed:
  xz.i686 0:4.999.9-0.3.beta.20091007git.el6 xz-lzma-compat.i686 0:4.999.9-0.3.beta.20091007git.el6

Complete!

Once man command has been installed successfully, you will be able to read the manual pages :

[root@centos63 ~]# man tar
TAR(1)                           User Commands                          TAR(1)

NAME
       tar - manual page for tar 1.23

SYNOPSIS
       tar [OPTION...] [FILE]...

DESCRIPTION
       GNU  âtarâ  saves  many  files together into a single tape or disk archive, and can
       restore individual files from the archive.

EXAMPLES
       tar -cf archive.tar foo bar
              # Create archive.tar from files foo and bar.

       tar -tvf archive.tar
              # List all files in archive.tar verbosely.

       tar -xf archive.tar
              # Extract all files from archive.tar.

..
..

Comments

Leave a Reply

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