Linux system errors

Linux System38 error codes

Reference list of 38 Linux system errors with meanings, common causes, and related context.

About Linux system errors

Linux system errors are reported through three mechanisms: process exit codes (0–255), POSIX signals, and errno constants defined in the C standard library. Exit code 0 means success; codes 1–2 indicate general or shell misuse errors; codes 126–128 and 128+n indicate permission issues or signal-based termination; and codes 130 and 137 specifically mean the process was killed by SIGINT (Ctrl+C) or SIGKILL (kill -9).

The errno constants (ENOMEM, EIO, EACCES, EAGAIN, and dozens more) provide finer-grained failure information than exit codes. Functions in the C library set errno when they fail, and higher-level tools and languages expose these values as error messages. Understanding both the exit code and the errno value is essential for diagnosing Linux process failures.

This collection documents 38 Linux system error codes and signals, covering both signal-based termination codes (exit 137 from SIGKILL, exit 139 from SIGSEGV) and errno-based failures (EIO, ENOMEM, EACCES). Each entry explains the signal or errno meaning, what triggers it, and how the kernel reports it to the parent process.

Severity

Showing 38 of 38 error codes

137
High

Process Killed — the process was terminated by a SIGKILL signal

3 common causes
11
High

Signal 11 (SIGSEGV) — kernel signal for invalid memory reference segmentation fault

4 common causes
139
High

Exit Code 139 — process terminated by segmentation fault (Signal 11 / SIGSEGV)

4 common causes
5
High

Input/output error EIO — a read or write operation could not complete

3 common causes
12
High

Out of Memory (ENOMEM) — the kernel cannot allocate the requested amount of memory

3 common causes
132
High

Illegal Instruction — the CPU reached an opcode it cannot decode or execute

3 common causes
134
High

Self-Abort — the process called abort() after detecting a state it cannot recover from

3 common causes
135
High

Bus Error — a memory access rejected at the hardware level, often around mmap'd files

3 common causes
28
High

No Space Left — the filesystem ran out of data blocks or of inodes

3 common causes
1
Medium

General Error — a non-specific failure in a command or script

3 common causes
13
Medium

Permission Denied — the process does not have permission to access the resource

3 common causes
126
Medium

Command Not Executable — the file was found but is not executable

3 common causes
3
Medium

Unspecified Error — a general-purpose failure code with no standardized meaning

3 common causes
131
Medium

Quit Signal — a Ctrl+\ interrupt that terminates the process and leaves a core dump

3 common causes
136
Medium

Arithmetic Fault — an integer division by zero or similar math trap, despite the name

3 common causes
141
Medium

Broken Pipe — the process wrote into a pipe whose reader is already gone

3 common causes
9
Medium

Bad File Descriptor — the descriptor number is not open in this process's table

3 common causes
14
Medium

Bad Address — the kernel could not reach the user-space buffer a syscall pointed at

3 common causes
16
Medium

Resource Busy — the target exists, but another holder refuses to release it right now

3 common causes
19
Medium

No Such Device — the operation targets hardware or a driver that is not present

3 common causes
22
Medium

Invalid Argument — a syscall received a malformed or self-contradictory parameter

3 common causes
24
Medium

Too Many Open Files — the process hit its per-process descriptor ceiling

3 common causes
30
Medium

Read-Only Filesystem — the mount itself refuses writes, so permission changes cannot help

3 common causes
32
Medium

Broken Pipe — a write failed because the pipe's read end had already closed

3 common causes
2
Low

Shell Misuse — improper use of shell built-ins or syntax

3 common causes
127
Low

Exit Code 127 — shell command or executable binary not found

4 common causes
130
Low

Terminated by User — the process was interrupted by a SIGINT signal

3 common causes
128
Low

Invalid Exit Argument — script exited with an out-of-range status or terminated by a signal

3 common causes
129
Low

Connection Hangup — the controlling terminal closed; daemons repurpose it as a config-reload trigger

3 common causes
133
Low

Trace Trap — a breakpoint or trap instruction fired, normally under a debugger's control

3 common causes
138
Low

User Signal 1 — an application-defined control channel rather than an error state

3 common causes
140
Low

User Signal 2 — the second application-defined channel, with a meaning set per program

3 common causes
142
Low

Timer Expired — an alarm() deadline the process set for itself has run out

3 common causes
143
Low

Termination Request — a polite shutdown signal the process may handle before exiting

3 common causes
4
Low

Interrupted Call — a signal arrived mid-operation; the call stopped and can simply be retried

3 common causes
17
Low

File Exists — a create-with-exclusivity request collided with a name that is already there

3 common causes
20
Low

Not a Directory — a path walks through a component that is an ordinary file

3 common causes
21
Low

Is a Directory — a file-level write or open was aimed at a directory

3 common causes

Frequently Asked Questions

Exit codes 128 and above typically indicate the process was terminated by a signal. The signal number is the exit code minus 128. For example, exit code 137 = 128 + 9 (SIGKILL), and exit code 139 = 128 + 11 (SIGSEGV).

Exit code 1 is a general-purpose error used by most programs for non-specific failures. Exit code 2 traditionally indicates a shell misuse error, such as invalid syntax in a bash script or a missing builtin. Many programs use both interchangeably.

Exit code 137 conventionally indicates that a process was terminated with SIGKILL (signal 9). One common context is the Linux OOM killer ending a process after it exceeds an available memory limit.