The online Reference Manual (man) pages provide detailed descriptions and usage of the commands. You can use the man command to display the man page entry that explains a given command. The syntax of the man command is as follows.
$ man command $ man option command $ man option filename
Displaying the Man Pages
For example, display the man pages for the uname command using the man command.
NAME(1) User Commands UNAME(1) NAME uname - print system information SYNOPSIS uname [OPTION]... DESCRIPTION Print certain system information. With no OPTION, same as -s. -a, --all print all information, in the following order, except omit -p and -i if unknown: -s, --kernel-name print the kernel name -n, --nodename print the network node hostname -r, --kernel-release print the kernel release ....
Scrolling Through the Man Pages
The following table lists the keyboard commands for scrolling through the man pages.
|Displays the next screen of a man page
|Displays the next line of a man page
|Moves back one full screen
|Searches forward for a pattern
|Finds the next occurrence of a pattern after you have used /pattern
|Provides a description of all scrolling capabilities
|Quits the man command and returns to the shell prompt
Searching the Man Pages
There are two ways to search for information in the man pages:
- Searching by section
- Searching by keyword
Searching the Man Pages: By Section
The online man page entries are organized into sections based on the type or usage of the command or file. For example, Section 1 contains user commands, and Section 4 contains information about various file formats. To look up a specific section of the man page, use the man command with the -s option, followed by the section number, and the command or file name.
$ man -s number command or $ man -s number filename
The table below shows the section numbers of the manual followed by the types of pages they contain.
|Executable programs or shell commands
|System calls (functions provided by the kernel)
|Library calls (functions within program libraries)
|Special files (usually found in /dev)
|File formats and conventions eg /etc/passwd
|Miscellaneous (including macro packages and conventions), e.g. man(7), groff(7)
|System administration commands (usually only for root)
|Kernel routines [Non standard]
The bottom portion of a man page, titled ‘SEE ALSO‘, lists other commands or files related to the man page. The number in parentheses reflects the section where the man page is located.
Searching the Man Pages: By Keyword
When you are unsure of the name of a command, you can use the man command with the -k option and a keyword to search for matching man page entries.
$ man -k keyword
The man command output provides a list of commands and descriptions that contain the specified keyword. For example, using the man command, view commands containing the syslog keyword.
# man -k syslog logger (1) - a shell command interface to the syslog(3) system log module rsyslog.conf (5) - rsyslogd(8) configuration file rsyslogd (8) - reliable and extended syslogd syslog (2) - read and/or clear kernel message ring buffer; set console_loglevel syslog (3) - send messages to the system logger syslog (3p) - control system log syslog.h (0p) - definitions for system error logging vsyslog (3) - send messages to the system logger