Reading Man Pages Explained
Nearly every command-line tool on Linux ships with reference documentation built directly into the system, accessible without a network connection. Man pages (short for manual pages) are that documentation, and while their formatting looks intimidating and terse at first glance, they follow a consistent structure that makes them fast to navigate once you know the pattern.
Opening a man page
man ls
This opens the manual page for ls in a pager (normally less), letting you scroll through it interactively.
q quit and return to the shell
space scroll forward one page
b scroll backward one page
/text search forward for "text"
n jump to the next search match
N jump to the previous search match
Since man pages are displayed through less, all of less’s normal navigation and search keys work the same way here as they would viewing any other file with less.
The standard structure
Most man pages follow a consistent section layout, in this order:
NAME the command name and a one-line description
SYNOPSIS a compact summary of valid syntax and options
DESCRIPTION a full explanation of what the command does
OPTIONS a detailed list of every flag and what it does
EXAMPLES sample invocations (not every man page includes this)
SEE ALSO related commands worth knowing about
The SYNOPSIS section uses a specific notation worth learning to read at a glance: square brackets [ ] mean optional, and anything not in brackets is required. ls [OPTION]... [FILE]... means ls takes zero or more options and zero or more files, all optional, which is why ls alone with no arguments is valid.
Man page sections
The same name can refer to different things depending on context, and man pages are organized into numbered sections to disambiguate:
| Section | Contents |
|---|---|
| 1 | User commands |
| 2 | System calls |
| 3 | Library functions |
| 4 | Special files (usually /dev entries) |
| 5 | File formats and configuration file syntax |
| 6 | Games |
| 7 | Miscellaneous (conventions, protocols, overviews) |
| 8 | System administration commands |
printf is a good example of why this matters: printf(1) is the shell command, and printf(3) is the C library function of the same name, a completely different piece of documentation. Running man printf shows whichever section is found first (usually section 1), and man 3 printf explicitly requests the library function page.
man 5 crontab # the crontab file format (how to write cron entries)
man 8 crontab # wait, actually check: crontab the command is section 1
man 1 crontab # the crontab command itself
When you see a man page number in documentation, like crontab(5), that number is telling you exactly which section to request if a plain man crontab does not land on the page you actually wanted.
Searching for the right command
If you know roughly what you want to do but not the exact command name, apropos searches the short description line of every installed man page for a keyword match:
apropos "list directory"
This is equivalent to man -k. It is the tool for “I don’t remember what this is called,” as opposed to a direct man lookup, which requires already knowing the exact name.
whatis ls
# ls (1) - list directory contents
whatis prints just the one-line description for a name you already know, a quick way to confirm you have the right command before opening the full page.
man vs —help
Most commands also support a --help flag that prints a brief usage summary directly to the terminal, with no pager:
ls --help
--help output is typically shorter than the corresponding man page: available options and a brief description, without the detailed explanations, examples, and related-command references a man page usually includes. For a quick reminder of a flag you have used before, --help is often faster since it does not require entering and exiting a pager. For learning an unfamiliar command properly, the man page is the more complete resource.
info pages
Some tools, particularly GNU utilities, ship more detailed documentation as info pages instead of, or in addition to, man pages:
info coreutils
info pages support hyperlink-style navigation between sections within the terminal, which can present more structured, book-like documentation than a single flat man page, though the interface takes some getting used to and is used less consistently across the ecosystem than man pages are.
When man says “No manual entry”
This happens for two main reasons: the command genuinely has no man page (some shell builtins and simple custom scripts do not ship with one), or the documentation package was not installed alongside the command, which is common on minimal server or container images trimmed to save space.
For Bash builtins specifically, try Bash’s own help system instead:
help cd
If a package’s man pages seem to be missing system-wide, check whether your distribution splits documentation into a separate package, a pattern common on Debian and Ubuntu where some packages ship a -doc variant that needs to be installed separately from the main package.
Frequently Asked Questions
How do I open the man page for a command?
Type man followed by the command name, for example man ls. This opens the manual page in a pager (usually less), which you can scroll through with the arrow keys, Page Up/Page Down, or space to move forward a full page. Press q at any time to quit and return to the shell. Man pages exist for most standard commands, system calls, configuration files, and library functions, covering far more than just the commands you type directly.
What do the numbers in parentheses mean, like ls(1) or printf(3)?
That number identifies which man page section the entry belongs to, since the same name can refer to different things documented in different sections. Section 1 is user commands, section 2 is system calls, section 3 is library functions, section 5 is file formats and configuration files, section 8 is system administration commands. printf(1) is the shell command; printf(3) is the C library function of the same name, a genuinely different piece of documentation. Running man printf shows whichever section comes first in the search order (usually 1), and man 3 printf explicitly requests the library function page instead.
How do I search for text within a man page?
Once a man page is open, press / followed by your search term and Enter, which jumps to the first match. Press n to jump to the next match, and N (shift+n) to jump to the previous match. This works because man pages are displayed through the less pager, and this is standard less search behavior, the same keys work for searching inside less when viewing any file, not just man pages.
What is the difference between man and —help?
The —help flag, supported by most commands, prints a brief usage summary directly to the terminal: available options, a short description, and basic syntax, with no pager involved. A man page is typically far more thorough, including detailed explanations of each option, usage examples, related commands, exit status meanings, and sometimes historical or implementation notes. For a quick reminder of an option you have used before, —help is often faster. For learning a command you are unfamiliar with, or understanding subtle option interactions, the man page is the better source.
How do I find the right command when I do not know its exact name?
Use apropos followed by a keyword, which searches the short description line of every man page on the system for matches: apropos “list directory” might surface ls and related commands. apropos is equivalent to man -k. This is useful when you know roughly what you want to do but do not know, or cannot remember, the specific command name that does it, since a direct man lookup requires already knowing the exact name.
Why does man say No manual entry for some commands?
This means either the command genuinely has no man page (some shell builtins and simpler custom scripts do not ship with one), or the package providing the man page was not installed alongside the command itself, which can happen on minimal or stripped-down system images where documentation is trimmed to save space. For shell builtins like cd or a specific Bash builtin, try help commandname inside Bash instead, which prints Bash’s own built-in documentation for builtins that do not have a traditional standalone man page. If a package’s documentation seems to be missing entirely, reinstalling the package or installing a distribution’s documentation package (sometimes split out separately, such as -doc packages on Debian) often resolves it.