man(1)
Display manual pages for Linux commands, system calls, and file formats.
Synopsis
man [OPTION]... [SECTION] NAME...Description
man is the system's manual pager. It displays formatted documentation (manual pages) for commands, system calls, library functions, and file formats. Manual pages are organized into numbered sections: 1 (commands), 2 (system calls), 3 (library functions), 4 (special files), 5 (file formats), 6 (games), 7 (conventions), and 8 (admin commands).
Without a section number, man searches sections in order and displays the first match found. Pages are typically formatted with less, allowing you to navigate with arrow keys, search with /, and quit with q.
Common options
| Flag | What it does |
|---|---|
-k KEYWORD | Search man page titles and summaries for keyword (like apropos) |
-f NAME | Display one-line summary for NAME (like whatis) |
-a | Display all matching pages, not just the first |
-s SECTION | Search only in specified section (e.g., -s 1, -s 3) |
-w | Print the path to the manual page instead of displaying it |
-P PAGER | Use specified pager instead of default (e.g., -P less) |
-L LOCALE | Search for pages in specified locale |
-M PATH | Search in custom manual page directories |
Examples
Display the manual page for ls command
man lsDisplay the open() system call documentation from section 2
man 2 openSearch for all manual pages with 'file' in title or summary
man -k fileShow one-line descriptions for all printf entries
man -f printfDisplay the printf() C library function from section 3
man 3 printfPrint the path to bash manual page without displaying it
man -w bashDisplay all manual pages for 'open' across all sections
man -a openDisplay /etc/passwd file format documentation from section 5
man 5 passwd