Unix Error Codes (errno)

Below is a list of Unix error numbers and codes. This list was generated with the simple Perl script below running Debian GNU/Linux. As you can see, the special Perl variable $! contains the C equivalent of errno as well as the string error message associated with the number. An equivalent C program to generate this list is also given below.


for($i = 0; $i < 133; $i++) {
    $! = $i;
    print "Errno $i: $!\n";

#include <stdio.h>
#include <string.h>
#include <errno.h>

extern int errno;

int main()
  int i;
  char *err_str;

  for(i = 0; i < 133; i++)
      errno = i;
      err_str = strerror(errno);
      printf("Errno %d: %s\n", errno, err_str);

  return 0;

List of Unix Error Codes
Errno 0:
Errno 1: Operation not permitted
Errno 2: No such file or directory
Errno 3: No such process
Errno 4: Interrupted system call
Errno 5: Input/output error
Errno 6: No such device or address
Errno 7: Argument list too long
Errno 8: Exec format error
Errno 9: Bad file descriptor
Errno 10: No child processes
Errno 11: Resource temporarily unavailable
Errno 12: Cannot allocate memory
Errno 13: Permission denied
Errno 14: Bad address
Errno 15: Block device required
Errno 16: Device or resource busy
Errno 17: File exists
Errno 18: Invalid cross-device link
Errno 19: No such device
Errno 20: Not a directory
Errno 21: Is a directory
Errno 22: Invalid argument
Errno 23: Too many open files in system
Errno 24: Too many open files
Errno 25: Inappropriate ioctl for device
Errno 26: Text file busy
Errno 27: File too large
Errno 28: No space left on device
Errno 29: Illegal seek
Errno 30: Read-only file system
Errno 31: Too many links
Errno 32: Broken pipe
Errno 33: Numerical argument out of domain
Errno 34: Numerical result out of range
Errno 35: Resource deadlock avoided
Errno 36: File name too long
Errno 37: No locks available
Errno 38: Function not implemented
Errno 39: Directory not empty
Errno 40: Too many levels of symbolic links
Errno 41: Unknown error 41
Errno 42: No message of desired type
Errno 43: Identifier removed
Errno 44: Channel number out of range
Errno 45: Level 2 not synchronized
Errno 46: Level 3 halted
Errno 47: Level 3 reset
Errno 48: Link number out of range
Errno 49: Protocol driver not attached
Errno 50: No CSI structure available
Errno 51: Level 2 halted
Errno 52: Invalid exchange
Errno 53: Invalid request descriptor
Errno 54: Exchange full
Errno 55: No anode
Errno 56: Invalid request code
Errno 57: Invalid slot
Errno 58: Unknown error 58
Errno 59: Bad font file format
Errno 60: Device not a stream
Errno 61: No data available
Errno 62: Timer expired
Errno 63: Out of streams resources
Errno 64: Machine is not on the network
Errno 65: Package not installed

If you find this page
helpful, please consider
visiting my sponsors.
Your ad revenue
supports this site.

Errno 66: Object is remote
Errno 67: Link has been severed
Errno 68: Advertise error
Errno 69: Srmount error
Errno 70: Communication error on send
Errno 71: Protocol error
Errno 72: Multihop attempted
Errno 73: RFS specific error
Errno 74: Bad message
Errno 75: Value too large for defined data type
Errno 76: Name not unique on network
Errno 77: File descriptor in bad state
Errno 78: Remote address changed
Errno 79: Can not access a needed shared library
Errno 80: Accessing a corrupted shared library
Errno 81: .lib section in a.out corrupted
Errno 82: Attempting to link in too many shared libraries
Errno 83: Cannot exec a shared library directly
Errno 84: Invalid or incomplete multibyte or wide character
Errno 85: Interrupted system call should be restarted
Errno 86: Streams pipe error
Errno 87: Too many users
Errno 88: Socket operation on non-socket
Errno 89: Destination address required
Errno 90: Message too long
Errno 91: Protocol wrong type for socket
Errno 92: Protocol not available
Errno 93: Protocol not supported
Errno 94: Socket type not supported
Errno 95: Operation not supported
Errno 96: Protocol family not supported
Errno 97: Address family not supported by protocol
Errno 98: Address already in use
Errno 99: Cannot assign requested address
Errno 100: Network is down
Errno 101: Network is unreachable
Errno 102: Network dropped connection on reset
Errno 103: Software caused connection abort
Errno 104: Connection reset by peer
Errno 105: No buffer space available
Errno 106: Transport endpoint is already connected
Errno 107: Transport endpoint is not connected
Errno 108: Cannot send after transport endpoint shutdown
Errno 109: Too many references: cannot splice
Errno 110: Connection timed out
Errno 111: Connection refused
Errno 112: Host is down
Errno 113: No route to host
Errno 114: Operation already in progress
Errno 115: Operation now in progress
Errno 116: Stale NFS file handle
Errno 117: Structure needs cleaning
Errno 118: Not a XENIX named type file
Errno 119: No XENIX semaphores available
Errno 120: Is a named type file
Errno 121: Remote I/O error
Errno 122: Disk quota exceeded
Errno 123: No medium found
Errno 124: Wrong medium type
Errno 125: Operation canceled
Errno 126: Required key not available
Errno 127: Key has expired
Errno 128: Key has been revoked
Errno 129: Key was rejected by service
Errno 130: Owner died
Errno 131: State not recoverable
Errno 132: Unknown error 132

In my own tests, all errors past 131 seem to be unknown. They are listed in much the same way as the line beginning with "Errno 132".

Home - Michael Mazack - Privacy Policy
michael @ mazack . org
Visitor Map