man Read the manual page for a command
Opens the built-in manual for a command, file format or system call. It is the first place to check what a flag does on your own system. Pages open in a pager, so press q to quit.
Synopsis
man [SECTION] name
man -k keyword
Common options
| Option or form | What it does |
|---|---|
SECTION | A section number placed before the name, for example man 5 crontab. It picks which manual to read when a name exists in several |
-k, apropos | Search page names and one-line descriptions for a keyword. man -k keyword is the same as apropos keyword |
-f | Show the short description of a page (the same as whatis) |
-w | Print the path of the page file instead of showing it |
-a | Show every matching page, one after another, not just the first |
Examples
man ls
man ls | head -n 5
man 5 crontab
man -k crontab
man grep
Notes
- Sections: 1 is commands, 2 system calls, 3 library functions, 5 file formats, 8 admin commands. A name can exist in several, so crontab(1) is the command and crontab(5) is the file format. Run man 5 crontab for the format.
- Inside a page: Space moves down a screen, b moves up, q quits. Press / then a word to search forward, n for the next match and N for the previous one.
- man -k and apropos depend on a search index. If they print nothing on a fresh Linux system, the index may not be built yet.
- Manuals differ between macOS (BSD) and Linux (GNU). Read the page on the machine you are using, since flags can differ.
- Many shell built-ins, such as cd, have no page of their own. On Linux use help cd in bash. On macOS man builtin covers many of them.
See also
Last reviewed 2026-10-07.