Bash Exit Code Lookup
Look up any bash exit code 0-255 and get the plain-English meaning, common causes, and generated error handler.
How to use the Bash Exit Code Lookup
- 1Type any exit code number (0–255) into the search field.
- 2The tool returns the standard meaning, common shell and OS causes, and context for that code.
- 3Click "Copy Handler" to get a ready-to-paste error handler snippet for your script.
- 4Use the browse mode to scan all codes without searching.
Run this script on a real Linux server
Get $200 free credit — DigitalOcean
Get $200 Free →Affiliate link · we earn a commission
Frequently Asked Questions
What does exit code 1 mean in bash?
Exit code 1 is a general error — the command failed for an unspecified reason. Check stderr for the actual error message. It is the most common non-zero exit code and is used by most utilities to signal failure.
What is exit code 127 in bash?
Exit code 127 means "command not found." The shell could not locate the binary in any of the directories listed in $PATH. Check that the command is installed and that its directory is in your PATH.
How do I check the exit code of the last command in bash?
Run `echo $?` immediately after the command. This prints the exit code of the most recently executed foreground command. In scripts, capture it with `exit_code=$?` before running anything else.
What exit code means success in bash?
Exit code 0 always means success in bash and all POSIX-compliant shells. Any non-zero value signals failure. This convention applies to every command, script, and function in the shell.