Chapter Objective
Locate and interpret the documentation installed on a Red Hat Enterprise Linux system, including man pages, info pages, and package documentation, without needing network access.
Key Commands
manwhatisaproposinfopinfomandb
Locate and interpret the documentation installed on a Red Hat Enterprise Linux system, including man pages, info pages, and package documentation, without needing network access.
manwhatisaproposinfopinfomandbRHEL installs extensive documentation directly on the system alongside the software it describes. Every command, configuration file, and system call generally has a corresponding reference you can read without ever opening a browser.
| Source | Covers | Access With |
|---|---|---|
| man pages | Commands, config files, system calls, libraries | man |
| info pages | GNU utilities, often more detailed than the man page | info / pinfo |
| /usr/share/doc | READMEs, changelogs, examples shipped with a package | ls, a pager, or less |
The man command displays the manual page for a command, file, or system call, opened in a pager (usually less).
# Open the manual page for a command man ssh # Open the manual page for a configuration file man sshd_config
| Key | Action |
|---|---|
Space / Page Down | Scroll forward one screen |
b / Page Up | Scroll backward one screen |
g | Jump to the top of the page |
G | Jump to the bottom of the page |
/pattern | Search forward for pattern |
n / N | Repeat search forward / backward |
q | Quit and return to the shell |
Most man pages follow a consistent set of headings, in roughly this order:
| Heading | Contains |
|---|---|
| NAME | The command and a one-line description |
| SYNOPSIS | The exact syntax, including required and optional arguments |
| DESCRIPTION | A full explanation of what the command does |
| OPTIONS | Every available flag, explained in detail |
| EXAMPLES | Sample invocations (not present on every page) |
| SEE ALSO | Related man pages worth checking next |
[ ] mean optional, and anything not bracketed is required. Options separated by | are mutually exclusive alternatives.
The same name can exist in more than one part of the manual — for example, passwd the user command and passwd the file format. To resolve this, man pages are divided into numbered sections.
| Section | Contents |
|---|---|
| 1 | User commands (executable programs or shell commands) |
| 2 | System calls (functions provided by the kernel) |
| 3 | Library calls (functions within program libraries) |
| 4 | Special files (usually found in /dev) |
| 5 | File formats and conventions (e.g. /etc/passwd) |
| 6 | Games |
| 7 | Miscellaneous (protocols, conventions, overviews) |
| 8 | System administration commands (usually root-only) |
# Default: man picks the lowest-numbered matching section man passwd # Explicitly request the file-format version (section 5) man 5 passwd # List every section that has a page for this name man -f passwd
When you don't know the exact command name, or need to search by topic instead, use whatis and apropos. Both search a prebuilt index (the mandb database) rather than scanning every file live.
# Show a one-line description for an exact command name whatis passwd # Search man page names AND descriptions for a keyword apropos partition # apropos is equivalent to: man -k man -k partition # Rebuild the search index after installing new documentation mandb
apropos and whatis rely on the mandb database. If you install a package and its man page doesn't show up in searches yet, run mandb to refresh the index.
For a fast reminder of a command's options without opening the full man page, most commands support --help:
# Quick summary of available options
ssh --help
tar --help
GNU utilities often ship a more detailed reference in the info system, organized as linked, hyperlinked "nodes" rather than a single flat page. pinfo provides a friendlier, color-highlighted way to browse the same content.
# Open the info page for a GNU utility info coreutils # Open a more readable info reader, if installed pinfo ls
| Key | Action |
|---|---|
Space / Backspace | Scroll forward / backward |
n / p | Go to next / previous node |
u | Go up one level to the parent node |
Enter on a link | Follow a cross-reference |
q | Quit |
tar, find, or grep, check its info page — it often contains a fuller tutorial-style explanation the man page only summarizes.
Many packages install additional documentation — README files, changelogs, licensing information, and example configuration files — into a subdirectory of /usr/share/doc named after the package.
# List documentation installed for a package ls /usr/share/doc/bash/ # Read a README with a pager less /usr/share/doc/bash/README # Find every doc directory on the system for packages matching a name ls -d /usr/share/doc/*ssh*
/usr/share/doc rather than the man page, especially for complex services. Check both.
man -kpasswd?whatis and apropos?apropos doesn't find its man page yet. What command fixes this?