Red Hat System Administration I · RH124

Chapter 3

Getting Help from Local Documentation
man page sections · info & pinfo · /usr/share/doc
CIS126RH — Mesa Community College

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

  • man
  • whatis
  • apropos
  • info
  • pinfo
  • mandb

Why Local Documentation?

RHEL 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.

SourceCoversAccess With
man pagesCommands, config files, system calls, librariesman
info pagesGNU utilities, often more detailed than the man pageinfo / pinfo
/usr/share/docREADMEs, changelogs, examples shipped with a packagels, a pager, or less
Why It Matters — Production servers are often isolated from the internet, and even when they aren't, local documentation matches the exact version of the software installed on that system — web search results frequently don't.

man Page Basics

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

Navigating Inside a man Page

KeyAction
Space / Page DownScroll forward one screen
b / Page UpScroll backward one screen
gJump to the top of the page
GJump to the bottom of the page
/patternSearch forward for pattern
n / NRepeat search forward / backward
qQuit and return to the shell

Anatomy of a man Page

Most man pages follow a consistent set of headings, in roughly this order:

HeadingContains
NAMEThe command and a one-line description
SYNOPSISThe exact syntax, including required and optional arguments
DESCRIPTIONA full explanation of what the command does
OPTIONSEvery available flag, explained in detail
EXAMPLESSample invocations (not present on every page)
SEE ALSORelated man pages worth checking next
Tip — Read SYNOPSIS Carefully — In a SYNOPSIS line, square brackets [ ] mean optional, and anything not bracketed is required. Options separated by | are mutually exclusive alternatives.

man Page Sections

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.

SectionContents
1User commands (executable programs or shell commands)
2System calls (functions provided by the kernel)
3Library calls (functions within program libraries)
4Special files (usually found in /dev)
5File formats and conventions (e.g. /etc/passwd)
6Games
7Miscellaneous (protocols, conventions, overviews)
8System administration commands (usually root-only)

Requesting a Specific Section

# 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
Warning — Don't Assume Section 1 — If a man page doesn't seem to answer your question, check whether a different section exists for that name before assuming the documentation is missing.

Finding the Right Page

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
Note — Keep the Index Currentapropos 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.

Quick Reference Without the Full Manual

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

info and pinfo

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

Navigating info Pages

KeyAction
Space / BackspaceScroll forward / backward
n / pGo to next / previous node
uGo up one level to the parent node
Enter on a linkFollow a cross-reference
qQuit
Tip — When to Reach for info Instead — If a man page feels thin on a core GNU tool like tar, find, or grep, check its info page — it often contains a fuller tutorial-style explanation the man page only summarizes.

Package Documentation in /usr/share/doc

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*
Note — Not Always Man-Page Material — Example config snippets and detailed changelogs frequently live in /usr/share/doc rather than the man page, especially for complex services. Check both.

Key Terms for Chapter 3

man page
A structured reference page documenting a command, file format, or system call
man section
One of eight numbered categories (1–8) that organize man pages by type
mandb
The searchable index of man page names and descriptions, and the command that rebuilds it
whatis
Displays the one-line NAME description for an exact command name
apropos
Searches man page names and descriptions for a keyword; equivalent to man -k
info page
GNU's hyperlinked documentation system, often more detailed than a man page
pinfo
A colorized, more user-friendly reader for info pages
SYNOPSIS
The man page section showing a command's exact syntax
/usr/share/doc
Directory tree holding supplementary documentation installed by packages

Review Questions

  1. What is the difference between man section 1 and man section 5? Give an example of a name that exists in both.
  2. Which command would you run to explicitly open the section 5 man page for passwd?
  3. What is the difference between whatis and apropos?
  4. You install a new package, but apropos doesn't find its man page yet. What command fixes this?
  5. Name one situation where an info page might be more useful to you than the equivalent man page.
  6. Where might you look for a package's example configuration files or changelog if the man page doesn't include them?
  7. Inside a man page, what key would you press to search forward for the word "timeout"?
1 / 15