Man page sections — quick reference
Theman 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:
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:
-s:
aproposdepends on a man-page database. On fresh systems that database might not exist. Ifaproposerrors, create or update the database:
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
systemcthen press Tab to autocomplete tosystemctl(if available). - Type
systemctlfollowed by a space and press Tab twice to list available subcommands and options. Example output:
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:
- Pick a command you know nothing about.
- Read
man <command>andcommand --help. - Try to accomplish a small task using only that material.
grep man output includes SYNOPSIS, DESCRIPTION, and commonly used options. Excerpt:
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.Links and references
- man — format of man pages and man command
- apropos / man -f
- mandb — create or update the man database
- systemd and journalctl documentation