*** Comprehensive list of exit codes from the Linux system:
Code | Description |
---|---|
0 | Successful exit without errors. |
1 | One or more generic errors encountered upon exit. |
2 | Incorrect usage, such as invalid options or missing arguments. |
126 | Command found but is not executable. |
127 | Command not found, usually the result of a missing directory in $PATH variable. |
128+N | Command encountered fatal error (was forcefully terminated manually or from an outside source). |
The N tells us which signal was received (see example below). | |
130 | Command terminated with signal 2 (SIGINT) (ctrl+c on keyboard ~ 128+2). |
143 | Command terminated with signal 15 (SIGTERM) (kill command ~ 128+15). |