Linux Error Codes (errno)

Search Linux errno values by name or number with POSIX descriptions.

Search Linux errno values by symbolic name like ENOENT or by number to get the macro, the standard POSIX/glibc meaning and a practical hint on what usually triggers it.

What is errno?

errno is a thread-local integer set by system calls and library functions when they fail. A return of -1 from a syscall is paired with errno holding the reason. Each value has a symbolic macro defined in errno.h, like ENOENT (2) or EACCES (13).

Decode a Linux errno without leaving the page

When a system call fails it sets errno, and tools like strace, perror, and log files report the symbolic name (ENOENT, EACCES, ETIMEDOUT) or just the number. This tool turns either form into a clear meaning and a hint about the usual cause, using the standard POSIX/glibc definitions.

How it works

The page carries a table of common errno entries: the number, the symbolic macro (such as ENOENT), the standard description, and a practical hint. A numeric query matches the errno number exactly. A text query matches the macro name and the description case-insensitively, so permission surfaces EACCES and EPERM together. The numbers shown are the values used on most Linux architectures; because POSIX standardises the names rather than the numbers, the macro is the portable identifier and the one your code should compare against.

Tips and notes

In C, read errno immediately after a failing call — almost any later library call can overwrite it — and turn it into text with strerror(errno) or perror("context"). Under the shell, run a failing program with strace -e trace=... to see exactly which syscall failed and with which errno. Watch for the pairs that share a value on Linux: EAGAIN/EWOULDBLOCK (11) and, on some setups, ENOTSUP/EOPNOTSUPP. A few numbers differ on MIPS and SPARC, so never hard-code the integer; compare the macro. This table covers the most common codes; the full glibc errno.h and the errno(3) man page are authoritative.