In Linux, ‘man’ pages are an essential resource for understanding the various commands available on your system. The ‘man’ command provides comprehensive details about a given command, including its syntax and the switches used. Essentially, ‘man’ formats and displays the on-line manual pages.
This tutorial will guide you through the process of installing the ‘man’ command on a CentOS 5.7 server. This is a crucial step for any system administrator or webmaster, as it enables you to access valuable information about the commands you’ll be using on your server. For more information about different types of servers, you can visit our pages on Apache, Nginx, and LiteSpeed.
Installing the ‘man’ Command on CentOS 5.7
To install the ‘man’ command on your CentOS 5.7 server, you will need to use the ‘yum’ package manager. The ‘yum’ command is used to install, update, and remove software packages in Linux distributions like CentOS. Here are the steps to install the ‘man’ command:
Open your terminal.
As a root user, run the following command:
[root@CentOS57 ~]# yum install man -y
This command tells ‘yum’ to install the ‘man’ package. The ‘-y’ option is used to automatically answer ‘yes’ to any prompts that may come up during the installation process.
After running this command, ‘yum’ will begin the installation process. It will resolve any dependencies that the ‘man’ package might have and install them as well. In this case, the dependencies are ‘groff’ and ‘bzip2’. ‘groff’ is a typesetting system that reads plain text mixed with formatting commands and produces formatted output, while ‘bzip2’ is a free and open-source file compression program.
[root@CentOS57 ~]# yum install man -y Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.oscc.org.my * extras: mirror.oscc.org.my * rpmforge: ftp-stud.fht-esslingen.de * updates: mirror.oscc.org.my 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:220.127.116.11-13.el5 set to be updated --> Finished Dependency Resolution Dependencies Resolved ==================================================================================================== Package Arch Version Repository Size ==================================================================================================== Installing: 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 18.104.22.168-13.el5 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-22.214.171.124-13.el5.i386.rpm | 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 Installed: man.i386 0:1.6d-2.el5 Dependency Installed: bzip2.i386 0:1.0.3-6.el5_5 groff.i386 0:126.96.36.199-13.el5 Complete!
Once the installation process is complete, you can verify the installation by running the ‘man’ command followed by ‘man’ again, like so:
[root@CentOS57 ~]# man man
This command will display the manual page for the ‘man’ command itself, confirming that the ‘man’ command has been successfully installed on your CentOS 5.7 server.
man(1) man(1) NAME man - format and display the on-line manual pages SYNOPSIS man [-acdfFhkKtwW] [--path] [-m system] [-p string] [-C config_file] [-M pathlist] [-P pager] [-B browser] [-H htmlpager] [-S section_list] [section] name ... DESCRIPTION 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 files. OPTIONS -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 /usr/bin/less-is, -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 variable. -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
- yum install man -y – This command installs the ‘man’ package on your CentOS server. The ‘-y’ option automatically answers ‘yes’ to any prompts that come up during the installation process.
- man man – This command displays the manual page for the ‘man’ command, confirming that the ‘man’ command has been successfully installed.
In conclusion, the ‘man’ command is a vital tool for any webmaster or system administrator working with Linux, particularly CentOS 5.7. It provides comprehensive details about the various commands available on your system, making it an invaluable resource for understanding and using these commands effectively. By following the steps outlined in this tutorial, you can easily install the ‘man’ command on your CentOS 5.7 server.
Whether you’re working with a dedicated server, a VPS server, cloud hosting, or shared hosting, having access to ‘man’ pages will undoubtedly enhance your ability to manage and troubleshoot your server effectively.
What is the ‘man’ command in Linux?
The ‘man’ command inLinux is used to display the user manual of any command that we can run on the terminal. It provides a detailed view of the command which includes NAME, SYNOPSIS, DESCRIPTION, OPTIONS, EXIT STATUS, RETURN VALUE, ERRORS, FILES, VERSIONS, EXAMPLES, AUTHORS and SEE ALSO.
What is the ‘yum’ command in CentOS?
The ‘yum’ command is a package manager that helps you to install, update, and remove software packages in CentOS and other Linux distributions. It automatically computes dependencies and figures out what things should occur to install packages.
What is the purpose of the ‘-y’ option in the ‘yum’ command?
The ‘-y’ option in the ‘yum’ command is used to automatically answer ‘yes’ to any prompts that come up during the installation process. This allows for non-interactive installation of packages.
What is ‘groff’ in Linux?
‘groff’ is a typesetting system in Linux. It reads plain text mixed with formatting commands and produces formatted output. It’s used for writing man pages and other documents.
What is ‘bzip2’ in Linux?
‘bzip2’ is a free and open-source file compression program in Linux. It’s used to compress files to a smaller size, which can be useful for saving disk space or for transferring files over the internet more quickly.