/dev
The directory holding device nodes: special files through which programs reach disks, terminals and other devices.
In more detail
The kernel populates /dev automatically as devices appear, for example /dev/sda for a disk and /dev/tty for your terminal. Opening one of these files talks to a device driver, not to stored data. Writing into the wrong one, such as a disk node, can destroy data, which is why they are protected by permissions.
Related terms
- device node — A special file, usually under /dev, that stands for a device so programs can open, read and write it like a file.
- block device — A storage device, such as a disk or a partition, that the kernel reads and writes in fixed-size blocks.
- /proc filesystem — A virtual folder the Linux kernel fills with live information about processes and the system.
- sysfs — A virtual filesystem mounted at /sys where the kernel exposes devices, drivers and their settings as files.
Taught in
- The Filesystem Hierarchy — Linux Fundamentals & Systems Administration
- Everything Is A File: proc, sys And dev — Linux Fundamentals & Systems Administration
- Booting: GRUB, The Kernel Command Line And initramfs — Linux Fundamentals & Systems Administration