man
Overview
man displays the system manual. Sections cover commands, syscalls, libraries, file formats, and admin topics. Still the authoritative offline reference.
Syntax
man [section] name
man [options] nameSections (common)
| Sec | Content | Example |
|---|---|---|
| 1 | User commands | man 1 printf |
| 2 | System calls | man 2 open |
| 3 | Library functions | man 3 printf |
| 4 | Devices | man 4 null |
| 5 | File formats | man 5 passwd |
| 7 | Overviews/conventions | man 7 signal |
| 8 | Admin commands | man 8 mount |
Common Options
| Option | Description |
|---|---|
-k / --apropos |
Search short descriptions |
-f / --whatis |
One-line summary |
-a |
All matching sections |
-w |
Path to man file |
-K |
Full-text search (slow) |
MANPAGER |
Override pager |
Examples with Explanations
Basics
man ls
man 5 sshd_config
man manDisambiguate
man -a printf # cycle sections
man 3 printf # C library
whatis printfSearch
man -k resize
apropos network interfaceWhere is the page?
man -w lsReadable width / browser
MANWIDTH=80 man ls
man -Hxdg-open ls # HTML if supportedPager keys (less)
/pattern, n, g/G, q, h help.