RED HAT ENTERPRISE LINUX
Locate, Read, and Use
System Documentation
Locate, read, and use system documentation including man, info, and files in /usr/share/doc
CIS126RH | RHEL System Administration 1
Mesa Community College
The RHCSA exam is an open-documentation exam — you are allowed to use local system documentation. This module covers the three primary documentation sources built into every RHEL system: man pages (the standard reference for commands, files, and system calls), info pages (detailed hyperlinked documentation for GNU tools), and /usr/share/doc (package-specific documentation, configuration examples, and README files). Knowing how to find and navigate all three sources efficiently is both a core skill and an exam advantage.
Learning Objectives
- Read man pages efficiently — Open man pages, navigate sections, search within pages, and find man pages for commands, files, and system calls using section numbers
-
Search for documentation with apropos and whatis —
Use
aproposto find man pages by keyword andwhatisto identify what a command does - Use info pages for GNU tool documentation — Navigate info pages with keyboard shortcuts and understand when info provides more detail than man
- Find and use documentation in /usr/share/doc — Locate package documentation, configuration examples, and README files that help configure services
Man Pages: The Standard Reference
Man pages (manual pages) are the primary documentation for Linux commands, system calls, configuration files, and library functions.
# Open the man page for a command
$ man ls
$ man passwd
$ man systemctl
# Open a man page for a configuration file
$ man sshd_config
$ man sudoers
$ man fstab
# Navigate inside man (pager controls — uses less)
# SPACE or f = next page
# b = previous page
# /PATTERN = search forward
# n = next search match
# N = previous search match
# G = jump to end
# g = jump to beginning
# q = quit
The exam is an open-documentation exam. Use man COMMAND to check
any flag, option, or syntax you are unsure of. On the exam, opening a man page
is faster and more reliable than guessing.
Man Page Sections
Man pages are organised into numbered sections. When a topic appears in multiple sections, specifying the section number opens the correct page.
| Section | Content | Example |
|---|---|---|
| 1 | User commands (executable programs) | man 1 passwd — the passwd command |
| 2 | System calls (kernel interfaces) | man 2 open — the open() system call |
| 3 | Library functions (C library) | man 3 printf — the printf() function |
| 4 | Special files (devices in /dev) | man 4 tty — the tty device |
| 5 | File formats and conventions | man 5 passwd — the /etc/passwd format |
| 6 | Games and screensavers | (rarely used) |
| 7 | Miscellaneous (standards, conventions) | man 7 signal — signal overview |
| 8 | System administration commands | man 8 sshd — the sshd daemon |
# passwd appears in section 1 (command) AND section 5 (file format)
$ man 1 passwd # the passwd command
$ man 5 passwd # the /etc/passwd file format
Navigating and Searching Man Pages
# Search for a keyword within the open man page
# After opening man sshd_config, find PasswordAuthentication:
# Type: /PasswordAuthentication then press ENTER
# Press: n for the next match
# Press: N for the previous match
# Open man page showing a specific section (SYNOPSIS, OPTIONS, etc.)
$ man --pager 'less +/EXAMPLES' crontab
# Opens man crontab and jumps to the first match of "EXAMPLES"
# Display the man page as plain text (no pager)
$ man ls | cat
# Grep inside a man page
$ man useradd | grep -A2 '\-u'
-u, --uid UID
The numerical value of the user's ID. This value must be unique,
unless the -o option is used. ...
# Find which man page to read for a configuration directive
$ man 5 sshd_config # format of /etc/ssh/sshd_config
$ man 5 sudoers # format of /etc/sudoers
$ man 5 crontab # format of a crontab file
$ man 5 fstab # format of /etc/fstab
Finding Man Pages: apropos and whatis
apropos searches man page summaries by keyword.
whatis shows the one-line description for a specific command.
# Search for man pages related to a keyword
$ apropos partition
cfdisk (8) - display or manipulate a disk partition table
fdisk (8) - manipulate disk partition table
gdisk (8) - Interactive GUID partition table (GPT) manipulator
parted (8) - a partition manipulation program
sfdisk (8) - display or manipulate a disk partition table
# apropos is equivalent to: man -k
$ man -k partition # same as apropos partition
# Find man pages related to user management
$ apropos user | grep "(8)"
groupadd (8) - create a new group
passwd (1) - update user's authentication tokens
useradd (8) - create a new user or update default new user information
userdel (8) - delete a user account and related files
usermod (8) - modify a user account
# whatis: show the one-line description of a command
$ whatis chmod
chmod (1) - change file mode bits
$ whatis passwd
passwd (1) - update user's authentication tokens
passwd (5) - password file
# whatis reveals that passwd exists in sections 1 AND 5
man -f and man -k: Built-in Search
# man -f is equivalent to whatis
$ man -f passwd
passwd (1) - update user's authentication tokens
passwd (5) - password file
# man -k is equivalent to apropos
$ man -k firewall
firewall-cmd (1) - firewalld command line client
firewall-config (1) - firewalld GUI configuration tool
firewalld (1) - Dynamic Firewall Manager
# If apropos returns "nothing appropriate" — rebuild the database
$ sudo mandb
Processing manual pages under /usr/share/man...
Updating index cache for path /usr/share/man/man1 ...
...
# Find man pages using a regex pattern
$ man -k '^ssh'
ssh (1) - OpenSSH remote login client
ssh-add (1) - adds private key identities to the ssh-agent
ssh-agent (1) - OpenSSH authentication agent
ssh-copy-id (1) - use locally available keys to authorise logins
ssh-keygen (1) - OpenSSH authentication key utility
sshd (8) - OpenSSH daemon
On the exam, man -k KEYWORD finds commands you know exist but cannot
name exactly. man -k cron shows all cron-related commands;
man -k logical volume shows LVM tools.
Info Pages: GNU Documentation
info pages are the primary documentation format for GNU tools. They
provide more detail than man pages, with hyperlinked navigation between topics.
# Open the info page for a command
$ info coreutils # GNU core utilities overview
$ info bash # Bash reference manual
$ info ls # info page for ls (part of coreutils)
$ info grep # detailed grep documentation
# Navigate inside info
# SPACE or PageDown = next screen
# DEL or PageUp = previous screen
# n = next node (topic)
# p = previous node
# u = up to parent node
# ENTER on a link = follow the link
# TAB = move to next link in current node
# /PATTERN ENTER = search forward
# q = quit
# If no info page exists, info falls back to the man page
$ info passwd # shows man page if no info page
Info Navigation Cheat Sheet
| Key | Action | Notes |
|---|---|---|
| SPACE / PageDown | Scroll down one screen | Same as less pager |
| DEL / PageUp | Scroll up one screen | Same as less pager |
| n | Next node at same level | Move to the next topic sibling |
| p | Previous node at same level | Move to the previous topic sibling |
| u | Up to parent node | Go back up the topic tree |
| l | Last (go back) — like browser back | Return to previously viewed node |
| ENTER on link | Follow the hyperlink | Links appear as *text* |
| TAB | Jump to next link in current node | Cycle through hyperlinks |
| m | Menu — go to a menu item by name | Type part of a node name |
| /PATTERN | Search forward for pattern | Works like / in less |
| q | Quit info | Return to shell |
/usr/share/doc: Package Documentation
Every installed package deposits its documentation in /usr/share/doc/.
This includes README files, configuration examples, changelog logs, and
sometimes complete configuration templates.
# List the documentation directory for a package
$ ls /usr/share/doc/
bash bind-utils chrony curl dnf httpd openssl rsync vim-common ...
# View documentation for a specific package
$ ls /usr/share/doc/httpd/
CHANGES LICENSE NOTICE README VERSIONING
$ ls /usr/share/doc/rsync/
COPYING INSTALL NEWS README.md rsyncd.conf.5 support tech_report.tex
# Many packages include example configuration files
$ ls /usr/share/doc/chrony/
COPYING FAQ NEWS chrony.conf.example
# View the example config file
$ cat /usr/share/doc/chrony/chrony.conf.example
# Find which package provides documentation in /usr/share/doc
$ ls -la /usr/share/doc/ | grep vsftpd
Searching /usr/share/doc
# Find which package a directory belongs to
$ rpm -qd rsync
/usr/share/doc/rsync/COPYING
/usr/share/doc/rsync/NEWS
/usr/share/doc/rsync/README.md
/usr/share/man/man1/rsync.1.gz
/usr/share/man/man5/rsyncd.conf.5.gz
# rpm -qd lists ALL documentation files for a package
# including man pages, /usr/share/doc, and other doc files
# Search for example config files across all packages
$ find /usr/share/doc -name "*.conf*" -o -name "*.example*"
/usr/share/doc/chrony/chrony.conf.example
/usr/share/doc/vsftpd/EXAMPLE
# Search for README files
$ find /usr/share/doc -name "README*" -ls
# View compressed documentation
$ zcat /usr/share/doc/rsync/changelog.Debian.gz
$ zless /path/to/compressed.gz
When you know the package name but not where its documentation is, rpm -qd
PACKAGENAME lists every documentation file — man pages, /usr/share/doc files,
and any other doc files installed by that package.
Command-Line Help: --help
Most commands provide quick usage information with --help or
-h — faster than a man page for a quick flag reminder.
# Show usage and options for a command
$ useradd --help
Usage: useradd [options] LOGIN
useradd -D
useradd -D [options]
Options:
-b, --base-dir BASE_DIR base directory for the home directory of the new
account
-c, --comment COMMENT GECOS field of the new account
-d, --home-dir HOME_DIR home directory of the new account
-e, --expiredate EXPIRE_DATE expiration date of the new account
-f, --inactive INACTIVE password inactivity period of the new account
-g, --gid GROUP name or ID of the primary group of the new account
-G, --groups GROUPS list of supplementary groups of the new account
...
# --help is faster than man for quick flag lookup
$ tar --help | grep "\-z"
-z, --gzip, --gunzip, --ungzip filter the archive through gzip
Documentation Sources: When to Use Each
| Source | Best for | Access |
|---|---|---|
man COMMAND |
Complete reference for flags, options, and syntax of any command or configuration file | Always available; use man 5 for config file formats |
man -k KEYWORD / apropos |
Finding the command name when you know what task you need to do | Requires mandb to be current |
COMMAND --help |
Quick flag reminder without reading a full page | Always available; no pager |
info COMMAND |
Detailed documentation for GNU tools — bash, grep, sed, awk, coreutils | Available for most GNU tools; falls back to man if not present |
/usr/share/doc/PACKAGE/ |
Example config files, README files, and service-specific guides | Available for any installed package; use ls to browse |
rpm -qd PACKAGE |
Finding all documentation files for a specific installed package | Always available for any installed package |
Documentation Quick Reference
| Task | Command |
|---|---|
| Open man page for a command | man COMMAND |
| Open section 5 (file format) man page | man 5 CONFIG_FILE |
| Search within an open man page | Type /PATTERN then n |
| Find man pages by keyword | apropos KEYWORD or man -k KEYWORD |
| Show one-line description of a command | whatis COMMAND or man -f COMMAND |
| Rebuild the man page database | sudo mandb |
| Open info page for a command | info COMMAND |
| Quick help summary | COMMAND --help |
| List package documentation directory | ls /usr/share/doc/PACKAGE/ |
| List all doc files for a package | rpm -qd PACKAGE |
| Find example config files | find /usr/share/doc -name "*.conf*" |
| View compressed documentation | zless FILE.gz or zcat FILE.gz |
Common Mistakes
| Mistake | What goes wrong | Correct approach |
|---|---|---|
| Not using man pages during the exam | Wrong flags or syntax — task fails due to a detail that could have been looked up | Use man COMMAND freely — the exam is open-documentation for local sources |
| Reading the wrong man page section | man passwd opens section 1 (command); section 5 (file format) is needed |
Use man 5 passwd for file format; whatis passwd reveals all sections |
| Not knowing how to search within a man page | Scrolling through long man pages manually — wastes exam time | Type /KEYWORD inside the pager and press n to jump to matches |
| Ignoring /usr/share/doc for service configuration | Spending time parsing dense man pages when a clear example file exists | Check ls /usr/share/doc/PACKAGENAME/ first — example configs save time |
| Getting "nothing appropriate" from apropos | The man page database is stale — search fails | Run sudo mandb to rebuild the database, then retry |
Not using COMMAND --help for quick option lookup |
Opening a full man page to find one flag — slower than necessary | useradd --help | grep gid is faster than reading man useradd for the -g flag |
Exam Documentation Strategy
The RHCSA exam allows use of local documentation. A systematic strategy saves time and prevents errors.
For any task involving a command you are unsure about
# 1. Quick options check
$ COMMAND --help | grep OPTION
# 2. Full syntax reference
$ man COMMAND # then type /KEYWORD to jump
For any task involving a configuration file
# 1. Check for example files
$ ls /usr/share/doc/PACKAGENAME/
# 2. Configuration file format reference
$ man 5 CONFIGFILENAME # e.g., man 5 sshd_config
# 3. Search within man page
# /DIRECTIVE_NAME then n to find the specific option
For a task when you cannot remember the command name
$ man -k KEYWORD # find candidate commands
$ whatis CANDIDATE # confirm it is the right one
$ man CANDIDATE # read the full page
Knowledge Check
Answer these before moving to the next slide.
- Write the command to find all man pages that mention the word "partition" in their description.
- Write the command to open the man page for the
/etc/passwdfile format (not the passwd command). How do you know which section to use? - Inside an open man page, how do you search for the text "PasswordAuthentication"? How do you jump to the next match?
- Write the command to list all documentation files installed by the
httpdpackage, including man pages. - Where would you look for an example configuration file for the
chronypackage? - Write the three commands that form a systematic approach when you need to configure a service but cannot remember the exact directive name.
Knowledge Check — Answers
apropos partitionor equivalentlyman -k partition— both search the man page database for "partition" in page names and summaries.man 5 passwd— the format of the/etc/passwdfile is documented in section 5 (file formats). Runwhatis passwdfirst to confirm it shows both sections:passwd (1)(the command) andpasswd (5)(the file format). Then useman 5 passwdto open the file format page.- Inside the open man page, type
/PasswordAuthenticationand press Enter. The pager jumps to the first match. Press n to jump to the next match. Press N to go back to the previous match. rpm -qd httpd— lists all documentation files installed by the httpd package, including entries under/usr/share/doc/httpd/and man pages under/usr/share/man/.- Check
ls /usr/share/doc/chrony/— this directory contains thechrony.conf.examplefile, which is a commented example configuration showing common settings. - (1)
ls /usr/share/doc/PACKAGENAME/to find example configuration files.
(2)man 5 CONFIGFILENAMEto read the file format reference.
(3) Inside the man page, type/DIRECTIVE_NAMEand press n to jump directly to the documentation for that specific directive.
Key Takeaways
-
The RHCSA exam allows local documentation — use it freely.
Man pages, info pages, and /usr/share/doc are all available.
A student who uses documentation to verify syntax will outperform one who relies
on memory. Know how to navigate efficiently with
/SEARCHand n. -
Man pages cover commands (section 1), file formats (section 5), and daemons (section 8).
man 5 sshd_config,man 5 sudoers,man 5 crontab, andman 5 fstabdocument exact configuration syntax. Usewhatis TOPICto discover which sections are available. -
Use
apropos/man -kwhen you cannot remember the command name.man -k partition,man -k logical volume,man -k firewallfind the right tools. Rebuild the database withsudo mandbif searches return nothing. -
Check
/usr/share/doc/PACKAGE/for configuration examples. Example config files are often more practical than man pages for service setup.rpm -qd PACKAGElists all documentation files for any installed package.COMMAND --help | grep OPTIONis the fastest option lookup.
Graded Lab
- Run
man ls. Navigate with SPACE and b. Search for "-l" by typing/-linside the page and press n to find multiple matches. Practice pressing q to quit. Confirm you can find the meaning of the-Zflag. - Run
whatis passwdto see both section 1 and section 5. Open each:man 1 passwd(the command), thenman 5 passwd(the file format). In the section 5 page, search for the word "shell" to find the description of the shell field. - Use
apropos cronto find documentation related to cron. Identify the man page for the crontab file format (section 5). Open it and search for the string "minute" to find the minute field specification. - Run
info coreutilsto open the GNU coreutils info page. Navigate using the menu to find the documentation for thelscommand. Useuto go back to the top. Press q to quit. - Run
ls /usr/share/doc/and pick three installed packages. For each, list their documentation files. For any package that has an example config file, view it withcatorless. - Run
rpm -qd bashandrpm -qd openssh-serverto list all documentation files for those packages. Identify the man page forsshd_configfrom the output and open it. Search for "PermitRootLogin" to find the directive.
"Locate, read, and use system documentation."
Use man COMMAND and man 5 CONFIGFILE on the exam — search
with /KEYWORD. Check /usr/share/doc/PACKAGE/ for examples.
Use man -k KEYWORD to find commands you cannot name.