help (shell builtin)

Updated

July 31, 2026

Overview

help shows documentation for shell builtins (commands implemented inside the shell, not as /usr/bin/... programs). External tools use --help or man instead.

Syntax

help [-dms] [pattern...]

Bash options: | Option | Description | |——–|————-| | -d | Short description | | -m | Manpage-like format | | -s | Short usage synopsis |

Examples with Explanations

help cd
help [[
help declare
help -m printf
help | less

Builtin vs external

type cd          # builtin
type ls          # usually hashed external
type -a echo     # may show both
help cd          # works
ls --help        # external flag
man ls           # full manual

List builtins (bash)

compgen -b | column
enable -a

Notes

  • Non-interactive scripts still run builtins; help is for humans.
  • zsh uses run-help; fish has help integrating web docs.
  • Prefer man bash for deep shell language reference.