$

Bash Exit Codes

Bash 5.x36 codes

Exit codes, signals, set -e, pipefail and shell errors

Showing 36 of 36 errors
CodeMessage
0Success
1General error
2Misuse of shell builtins
126Command not executable
127Command not found
128Invalid argument to exit
130Script terminated by Control-C (SIGINT)
137Process killed (SIGKILL)
139Segmentation fault (SIGSEGV)
141Broken pipe (SIGPIPE)
143Terminated (SIGTERM)
1Permission denied
1No such file or directory
1Unbound variable
2Syntax error
124Command timed out
125Command cannot be run by timeout
129Hangup (SIGHUP)
131Quit and core dump (SIGQUIT)
132Illegal instruction (SIGILL)
134Abort (SIGABRT)
135Bus error (SIGBUS)
136Floating-point exception (SIGFPE)
138User-defined signal 1 (SIGUSR1)
140User-defined signal 2 (SIGUSR2)
142Alarm clock (SIGALRM)
148Stopped by Ctrl+Z (SIGTSTP)
152CPU time limit exceeded (SIGXCPU)
153File size limit exceeded (SIGXFSZ)
255Exit status out of range / fatal error
set -eUnexpected exit from set -e (errexit)
pipefailPipeline failed (set -o pipefail)
trap ERRERR trap — command failed
trap EXITEXIT trap — cleanup on script exit
ulimitResource limit exceeded
subshellSubshell or command substitution exit code