Skip to main content
When you forget the name of a command, the man pages, apropos, and shell completion are the fastest ways to rediscover it. This guide summarizes how to read man pages, search the man database, and use tab completion to build commands interactively.

Man page sections — quick reference

The man manual is divided into numbered sections. Here’s a concise reference: You can request a specific section when a name exists in multiple sections. For example:

Read a man page (example: man and journalctl)

Running man man shows the section table (the example above), then details on using man. A typical man page (example: journalctl) includes NAME, SYNOPSIS, and DESCRIPTION sections:
Man pages often include long option lists and examples — read SYNOPSIS for usage patterns and DESCRIPTION for context.

Find commands with apropos

If you vaguely remember a command’s purpose but not its name, apropos searches the short descriptions (the same text man -f shows). Search for related terms. Example: to find commands about directories, searching director often matches both directory and directories:
If you want only command-line utilities (sections 1 and 8) — excluding kernel/library entries — restrict the search with -s:
Notes:
  • apropos depends on a man-page database. On fresh systems that database might not exist. If apropos errors, create or update the database:
On long-running systems this is usually maintained automatically. Tip: choose word stems that match both singular and plural forms (e.g., director vs directory) to broaden results.

Interactive discovery with tab completion

Modern shells and command packages provide rich completion support — use Tab to discover commands, subcommands, options, filenames, and directories. Examples to try in an interactive shell:
  • Type systemc then press Tab to autocomplete to systemctl (if available).
  • Type systemctl followed by a space and press Tab twice to list available subcommands and options. Example output:
You can complete fragments too: typing systemctl list-dep then pressing Tab will finish to systemctl list-dependencies. Tab completion also works for filesystem paths and long filenames:

Learn by doing: use man pages and —help together

Man pages and --help output can be dense. A recommended learning loop:
  1. Pick a command you know nothing about.
  2. Read man <command> and command --help.
  3. Try to accomplish a small task using only that material.
Example: grep man output includes SYNOPSIS, DESCRIPTION, and commonly used options. Excerpt:
Man pages may also include reporting and help URLs in angle brackets; those are part of the documentation and safe to read.

Practice and confidence

Use man pages, apropos, --help, and tab completion together. Small time savings from knowing these tools compound — whether you’re troubleshooting or preparing for an exam.
Tip: If apropos returns nothing, run sudo mandb to build the man-db. Restrict apropos searches to relevant sections (for example: -s 1,8) to avoid results from kernel or library pages.

Watch Video

Practice Lab