Skip to content
shellmap

get-helpDisplay help text for cmdlets and functions — man equivalent across all 5 shells

Equivalents in every shell

Bashunix
man grep

Reads the man page for a command (manual section 1 by default). `man -k <keyword>` (or `apropos`) searches summary lines. For shell builtins, `help <builtin>` gives bash-specific text since builtins do not have separate man pages. `info <command>` accesses GNU info pages where available.

Zshunix
man grep

Same `man` toolchain. Zsh also has `run-help` (interactive: `Esc h` on the current command line) which prefers more granular sources — for builtins it shows the zsh manual section; for external commands it falls back to `man`.

Fishunix
man grep

Same `man` toolchain. Fish also has `help <topic>` which opens the fish documentation in your browser (great for fish-specific syntax). `man fish-tutorial` is a quick read for fish-native users.

PowerShellwindows
Get-Help Get-Process

Aliased as `help` and `man`. Returns structured help text — `-Examples`, `-Detailed`, `-Full` switch between verbosity levels; `-Online` opens the docs.microsoft.com page in the default browser. First-run on a fresh pwsh install: run `Update-Help` once to download the bundled help XML.

cmd.exewindows
help dir

Built-in. Prints help for cmd internal commands (`help` alone lists them). External tools usually accept `<command> /?` for short help (`xcopy /?`, `robocopy /?`). cmd has no equivalent to `man -k` keyword search.

Worked examples

Show help for a command

Bash
man grep
PowerShell
Get-Help Get-Process
cmd.exe
help dir

Show examples only

PowerShell
Get-Help Get-Process -Examples

Open the canonical online docs

Bash
xdg-open https://manpages.debian.org/grep
PowerShell
Get-Help Get-Process -Online

Gotchas

  • On a fresh pwsh install, `Get-Help <cmdlet>` returns only a one-line stub plus a prompt to run `Update-Help`. Run it ONCE as administrator (Windows) or with sudo (Linux/macOS) to populate the local help cache from Microsoft's servers — without it, `-Examples` and `-Detailed` return nothing useful.
  • `Get-Help <name>` accepts wildcards: `Get-Help Get-*` lists every cmdlet starting with `Get-`. Combined with `-Category` you can scope to e.g. only Cmdlets, only Functions, or only About_ topics.
  • `about_*` topics are conceptual docs (`about_Variables`, `about_Operators`, `about_PSReadLine`) — there is no `man` equivalent for these. List them with `Get-Help about_*`; they're the closest thing pwsh has to GNU info pages.
  • `-Online` builds the URL from the cmdlet's HelpUri property and opens it via `Start-Process`. For modules without an online help link, it falls back to a Microsoft Docs search — useful but not authoritative. Always check the help text version first if behaviour is version-sensitive.
  • The `man` alias for `Get-Help` shadows the system `/usr/bin/man` on Linux/macOS pwsh hosts. To reach the Unix man page when both `Get-Help <cmdlet>` and Unix man pages might match, use `& /usr/bin/man grep` (forced external invocation) or `Remove-Item Alias:man` once per session.

WSL & PowerShell Core notes

pwsh`Get-Help` is fully cross-platform. The cmdlet structure is identical; only the OS-specific help content differs (Windows-only cmdlets like `Get-Service` return Windows-specific examples; cross-platform cmdlets like `Get-Process` show platform-appropriate output). `Update-Help` works on every platform — it pulls help XML over HTTPS from Microsoft's CDN.
WSLInside WSL bash, `man <cmd>` is the bash way. To read pwsh help from WSL: `pwsh.exe -c "Get-Help Get-Process -Examples"` invokes Windows-side pwsh via interop, or install pwsh inside WSL (`apt install powershell` after adding Microsoft's repo). Conversely, calling Linux `man` from Windows-side pwsh: `wsl.exe man grep`. Both produce paginated output that respects `$PAGER` / `less` on the WSL side.

Related commands