# File Descriptor
Status: Growing
A file descriptor is a process-local integer handle for an open I/O resource.
## Mental Model
The process holds a table. The file descriptor is an index into that table. The table entry points to kernel state representing an open file, socket, pipe, terminal, or device.
## Standard Descriptors
- `0`: stdin
- `1`: stdout
- `2`: stderr
## Why It Matters
File descriptors explain many Linux behaviors:
- Shell redirection.
- Pipes.
- Sockets.
- Descriptor leaks.
- Shared offsets after `dup`.
## Related
- [[Articles/File Descriptors Part 1]]
- [[Articles/File Descriptors Part 2]]
- [[Articles/Tracing System Calls at a High Level]]
- [[Topics/Linux & Systems]]