man
Display command manual pages
TLDR
Display the man page for a command
Open the man page for a command in a browser (BROWSER environment variable can replace =browser_name)
Display the man page for a command from section 7
List all available sections for a command
Display the path searched for manpages
Display the location of a manpage rather than the manpage itself
Display the man page using a specific locale
Search for manpages containing a search string
SYNOPSIS
man [options] [[section] page ...]
PARAMETERS
-a
Find all man pages matching the supplied page names, rather than just the first. Display each man page in succession.
-d
Don't actually display the man pages, but do print the locations the man pages would be searched for.
-f page
Equivalent to whatis page.
-k keyword
Equivalent to apropos keyword.
-K keyword
Search for keyword in all man pages.
-m system
Specify an alternate set of manual pages to search.
-P pager
Specify an alternate pager program to use.
-w|-W page
Print the path to the man page (or pages if -a is used) that would be displayed.
[section]
Specify the manual section to search for. For example, 'man 3 printf' searches for the printf function in section 3 (library functions).
DESCRIPTION
The man command is a ubiquitous utility on Unix-like operating systems used to display the system's reference manuals, often referred to as "man pages." These pages provide comprehensive documentation for commands, system calls, libraries, and other components of the operating system. man formats and presents this information in a readable manner within the terminal. It searches a predefined set of directories for manual pages, applying formatting to make the text easily understandable. Users typically invoke man followed by the name of the command or topic they wish to learn about.
Man pages are essential for understanding how to use commands correctly, exploring available options, and understanding the overall behavior of various system components. They are typically written by the developers of the software they describe and provide a reliable source of information for system administrators, programmers, and users alike. man is a fundamental tool for navigating the complexities of a Unix-like environment.
CAVEATS
The availability and content of man pages can vary greatly depending on the specific operating system distribution and the installed software packages. It is recommended to use local copies where available for security reasons.
MANUAL SECTIONS
Manual pages are typically organized into sections, each covering a different category of information. Some common sections include:
1: Executable programs or shell commands
2: System calls (functions provided by the kernel)
3: Library calls (functions within program libraries)
4: Special files (usually found in /dev)
5: File formats and conventions
6: Games
7: Miscellaneous (including macro packages and conventions),
8: System administration commands (usually only for root)
HISTORY
The man command has been a core component of Unix systems since the early days of its development. Initially, manual pages were simple text files. Over time, formatting languages like troff and nroff were adopted to improve the appearance and readability of the documentation. GNU's implementation of man introduced features such as searching, indexing, and support for different output formats. The command remains a vital resource for both novice and expert users, serving as the primary means of accessing detailed information about system commands and functions.