Terminal · foundation
Manual pages and built-in help
Manual pages, a program's help option, and a shell's built-in help are complementary sources that document command syntax and behavior for the installed environment.
Why it matters
Reading the documentation shipped for the actual command and version is more reliable than guessing flags or copying an unrelated platform's example.
Mental model
How to reason about manual pages and built-in help
First identify who implements the command—a standalone executable or the shell—then ask that implementation for its local documentation.
Analogy
It is like checking the operating manual attached to the exact machine model instead of assuming every machine with the same label has identical controls.
Examples
See the boundary, not just the happy path
Worked example · Search a manual page
man rsyncInside the pager, /pattern searches and n advances to the next match, making a long reference useful for targeted questions.
Worked example · Ask Bash about a built-in
help cdBecause cd changes shell state and is implemented as a built-in, Bash's own help describes its behavior more directly than an external utility page.
Useful contrast · Concise program summary
curl --help allA help option is generated by the program and is often quicker than a manual page, but its accepted spelling and coverage are program-specific.
Common mistakes
Misconceptions to remove early
Assuming --help is universal
It is a widespread convention, not shell syntax guaranteed for every program; consult the program's documented interface.
Ignoring manual sections
The same name can occur in multiple sections, such as a command and a library function, so man 1 printf and man 3 printf can document different interfaces.
Quick check
Can you predict the result?
1. Which command is usually the best first choice for documentation about Bash's cd built-in?
- • help cd
- • man chdir
- • grep cd /etc
2. Why can an online command example disagree with the local manual?
Keep building