invocation-option

Bash --help

Prints Bash invocation usage, supported flags and version information to stdout for the installed binary. The exact wording depends on version and locale; use builtin help for individual shell builtins, and avoid parsing usage as a stable interface. Run in a fresh private directory with HOME set to that directory and LC_ALL=C. Expected output (one item per line): invocation help available.

Formal Syntax & Structure

bash syntaxbash
bash --help

Return Value

exit status

See the example and command status; failures are nonzero.

Working Example

Example Snippetbash
bash --help > usage || exit 1grep -Fq -- '--noprofile' usage || exit 1printf 'invocation help available\n'
Bash Reference