The original built-in docs
Every Unix command since 1971 has shipped with a manual page. man ls, man bash, man printf — they all open in less, the same pager you use for log files. Once you trust man pages, you stop tab-out-to-Google for syntax.
Man page sections
Man pages are organized into 9 numbered sections:
- 1 — User commands (
man 1 ls) - 2 — System calls (
man 2 open) - 3 — Library functions (
man 3 printf— C, different fromman 1 printfthe shell built-in) - 5 — File formats (
man 5 crontab) - 7 — Miscellaneous concepts (
man 7 signal) - 8 — System administration (
man 8 launchd)
If two pages share a name, man -a walks all of them.
Searching inside a man page
Once a man page is open, you are in less. Press / and type a pattern to search. n = next match, N = previous, q = quit. g = top, G = bottom. Type h in less to see the full keymap.
Searching across all man pages
apropos (alias man -k) searches the one-line description of every man page. apropos socket turns up every command and library function related to sockets. man -f socket shows the title line for one specific name.
When man is not enough
Man pages are exhaustive but terse. For a friendlier experience try tldr (community examples) or cheat (cheat sheets). We cover both in the next lesson — they complement man, they don't replace it.