invocation-option

Bash --version — interpreter version

Prints GNU Bash version/build information and exits. Checks the Bash executable resolved by the caller; does not establish the current interactive shell identity.

Formal Syntax & Structure

bash syntaxbash
bash --version

Return Value

exit status

0 on normal successful invocation.

Working Example

Example Snippetbash
bash --version
Bash Reference