How to Install man Pages Command on CentOS 5.7

Share this Article :

Man pages are a common way to learn the commands that are on your system. The man command will give you all the details of a given command, including switches used, and syntax. man formats and displays the on-line manual pages. This post will show the quick steps to install man command on linux CentOS 5.7 server.

[[email protected] ~]# yum install man -y
[[email protected] ~]# yum install man -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base:
 * extras:
 * rpmforge:
 * updates:
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package man.i386 0:1.6d-2.el5 set to be updated
--> Processing Dependency: groff >= 1.18 for package: man
--> Processing Dependency: bzip2 for package: man
--> Processing Dependency: nroff-i18n for package: man
--> Running transaction check
---> Package bzip2.i386 0:1.0.3-6.el5_5 set to be updated
---> Package groff.i386 0: set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

 Package              Arch                Version                         Repository           Size
 man                  i386                1.6d-2.el5                      base                262 k
Installing for dependencies:
 bzip2                i386                1.0.3-6.el5_5                   base                 49 k
 groff                i386                       base                1.9 M

Transaction Summary
Install       3 Package(s)
Upgrade       0 Package(s)

Total download size: 2.2 M
Downloading Packages:
(1/3): bzip2-1.0.3-6.el5_5.i386.rpm                                          |  49 kB     00:00
(2/3): man-1.6d-2.el5.i386.rpm                                               | 262 kB     00:02
(3/3): groff-                                        | 1.9 MB     00:17
Total                                                               104 kB/s | 2.2 MB     00:21
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : bzip2                                                                        1/3
  Installing     : groff                                                                        2/3
  Installing     : man                                                                          3/3

  man.i386 0:1.6d-2.el5

Dependency Installed:
  bzip2.i386 0:1.0.3-6.el5_5                      groff.i386 0:


To man command manual simply run “man man” as below :

[[email protected] ~]# man man
man(1)                                                                  man(1)

       man - format and display the on-line manual pages

       man  [-acdfFhkKtwW]  [--path]  [-m system] [-p string] [-C config_file]
       [-M pathlist] [-P pager] [-B browser] [-H htmlpager] [-S  section_list]
       [section] name ...

       man formats and displays the on-line manual pages.  If you specify sec-
       tion, man only looks in that section of the manual.  name  is  normally
       the  name of the manual page, which is typically the name of a command,
       function, or file.  However, if name contains  a  slash  (/)  then  man
       interprets  it  as a file specification, so that you can do man ./foo.5
       or even man /cd/foo/bar.1.gz.

       See below for a description of where man  looks  for  the  manual  page

       -C  config_file
              Specify   the   configuration   file  to  use;  the  default  is
              /etc/man.config.  (See man.config(5).)

       -M  path
              Specify the list of directories to search for man pages.   Sepa-
              rate  the directories with colons.  An empty list is the same as
              not specifying -M at all.  See SEARCH PATH FOR MANUAL PAGES.

       -P  pager
              Specify which pager to use.  This option overrides the  MANPAGER
              environment  variable,  which  in turn overrides the PAGER vari-
              able.  By default, man uses /usr/bin/less -is.

       -B     Specify which browser to use on HTML files.  This  option  over-
              rides  the  BROWSER  environment  variable. By default, man uses

       -H     Specify a command that renders HTML files as text.  This  option
              overrides  the  HTMLPAGER  environment variable. By default, man
              uses /bin/cat,

       -S  section_list
              List is a colon separated list of  manual  sections  to  search.
              This option overrides the MANSECT environment variable.

       -a     By default, man will exit after displaying the first manual page
              it finds.  Using this option forces man to display all the  man-
              ual pages that match name, not just the first.

       -c     Reformat  the  source man page, even when an up-to-date cat page
              exists.  This can be meaningful if the cat  page  was  formatted
              for  a screen with a different number of columns, or if the pre-
              formatted page is corrupted.

       -d     Donât actually display the man  pages,  but  do  print  gobs  of
              debugging information.

       -D     Both display and print debugging info.

       -f     Equivalent to whatis.

       -F or --preformat
              Format only - do not display.

       -h     Print a help message and exit.

       -k     Equivalent to apropos.

       -K     Search  for  the  specified  string in *all* man pages. Warning:
              this is probably very slow!  It  helps  to  specify  a  section.
              (Just  to  give  a  rough idea, on my machine this takes about a
              minute per 500 man pages.)

       -m  system
              Specify an alternate set of man pages to  search  based  on  the
              system name given.

       -p  string
              Specify  the  sequence  of  preprocessors to run before nroff or
              troff.  Not all installations will have a full set of preproces-
              sors.   Some of the preprocessors and the letters used to desig-
              nate them are: eqn (e), grap (g), pic (p), tbl (t), vgrind  (v),
              refer  (r).   This  option  overrides the MANROFFSEQ environment

       -t     Use /usr/bin/groff -Tps -mandoc to format the manual page, pass-
              ing  the  output  to  stdout.   The  default  output  format  of
              /usr/bin/groff -Tps -mandoc is Postscript, refer to  the  manual
              page  of  /usr/bin/groff -Tps -mandoc for ways to pick an alter-
              nate format.

       Depending on the selected  format  and  the  availability  of  printing
       devices,  the  output  may  need  to  be  passed through some filter or
       another before being printed.

       -w or --path
              Donât actually display the man pages, but  do  print  the  loca-
              tion(s) of the files that would be formatted or displayed. If no
              argument is given: display (on stdout) the list  of  directories
              that  is  searched by man for man pages. If manpath is a link to
              man, then "manpath" is equivalent to "man --path".

       -W     Like -w, but print file names one per line,  without  additional
              information.   This is useful in shell commands like man -aW man
              | xargs ls -l

Leave a Reply