Many of the commands, programs and files that are found on your virtual server come with short reference manuals known as "man pages." These man pages explain the basic operation, command syntax, and other information. Often, they will even provide usage examples.
These manuals can be viewed with the man command using the following syntax, where command is the name of the command you wish to learn about:
> man command
For example, to learn more about the ls command, type:
> man ls
NOTE: The man pages for Apache and its related commands are stored in the /www/man directory. To view the man page for a program or file related to Apache, you must use the -M option, followed by the location of the man pages.
For example, to view the man page on the htpasswd command, you would type the following command at the shell prompt:
> man -M /www/man htpasswd
The online manual that you access with the man command is actually divided into sections. In some cases, the same topic may appear in more than one section of the online manual. For example, there is a chmod user command and a chmod() system call. For this reason, each section of the online manual is assigned a number, as follows:
(1) User commands.
(2) System calls and error numbers.
(3) Functions in the C libraries.
(4) Device drivers.
(5) File formats.
(6) Games and other diversions.
(7) Miscellaneous information.
(8) System maintenance and operation commands.
(9) Kernel developers.
In the case of the chmod example, you can tell the man command which section of the manual you want to look in by specifying the section number:
> man 1 chmod
This will display the manual page for the user command chmod. Text references to a particular section of the online manual are traditionally placed in parentheses, so chmod(1) refers to the chmod user command and chmod(2) refers to the system call.
To view just a brief description of a command you can also use the whatis command, as shown below:
> whatis chmod
chmod(1) - change file modes
chmod(2), fchmod(2), lchmod(2) - change mode of file
If you wish to look up a command but cannot recall the name of the command, the apropos command can help. It suggests man pages that may contain the appropriate information. For example, the following command displays a list of all command descriptions that include the "mail" keyword:
> apropos mail