man command (Linux / bash / sh / zsh)
What it does
Read installed manual pages for commands, formats, and APIs. When people search for the man command linux help, they usually want man's everyday flags, safe examples, and how it differs from related tools. Below you'll find syntax, options, and copyable examples for Bash/sh/zsh.
Read installed manual pages for commands, formats, and APIs.
Syntax
man [OPTION]... [SECTION] PAGE...
Common options
| Flag / option | Meaning |
|---|---|
| -k TERM | Search page names and descriptions. |
| -f PAGE | Show short descriptions for matching pages. |
| -a | Display all matching pages. |
| SECTION | Open a page from a specific manual section. |
Practical examples
Read a page
man grep
Opens the grep manual.
Open syscall page
man 2 open
Selects open from section 2.
Search manuals
man -k archive
Finds pages related to archives.
Common mistakes
- Assuming every installed command includes a manual page.
- Ignoring manual sections when the same name describes a command and an API.
Related commands
- lessPage through text interactively without loading it all at once.
- whichLocate the executable selected from the current PATH.
- Get-HelpDisplay syntax, parameter details, examples, and conceptual PowerShell help.
- Get-CommandDiscover commands, aliases, functions, scripts, and applications available to PowerShell.
- ForEach-ObjectRun a script block for each object arriving through the pipeline.
- historyDisplay or modify the current shell's command history.
- clsClear visible text from the Command Prompt screen.
FAQ
What does man do in Linux?
Read installed manual pages for commands, formats, and APIs.
How do I use man from the terminal?
Start with `man [OPTION]... [SECTION] PAGE...`, then choose only the options needed for the task.
What is a practical man example?
Try `man grep` — Opens the grep manual.
Can I use man in a shell script?
Yes. man works in Bash, sh, and Zsh, but scripts should handle quoting, errors, and command output explicitly.
Browse the full Linux and Windows command reference to search more bash, CMD, PowerShell, Conda, and GitHub CLI commands.