$linuxjunkies
>

man(1)

Display manual pages for Linux commands, system calls, and file formats.

UbuntuDebianFedoraArch

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

FlagWhat it does
-k KEYWORDSearch man page titles and summaries for keyword (like apropos)
-f NAMEDisplay one-line summary for NAME (like whatis)
-aDisplay all matching pages, not just the first
-s SECTIONSearch only in specified section (e.g., -s 1, -s 3)
-wPrint the path to the manual page instead of displaying it
-P PAGERUse specified pager instead of default (e.g., -P less)
-L LOCALESearch for pages in specified locale
-M PATHSearch in custom manual page directories

Examples

Display the manual page for ls command

man ls

Display the open() system call documentation from section 2

man 2 open

Search for all manual pages with 'file' in title or summary

man -k file

Show one-line descriptions for all printf entries

man -f printf

Display the printf() C library function from section 3

man 3 printf

Print the path to bash manual page without displaying it

man -w bash

Display all manual pages for 'open' across all sections

man -a open

Display /etc/passwd file format documentation from section 5

man 5 passwd

Related commands