device node
A special file, usually under /dev, that stands for a device so programs can open, read and write it like a file.
In more detail
A device node has no data of its own: the kernel passes reads and writes to the matching driver. Some represent hardware, such as a disk; others are pseudo-devices that only exist in software, such as /dev/null, which discards everything, and /dev/urandom, which returns random bytes. Confirm what a node represents and which permissions protect it before redirecting output into it.
Example
The course record source=dev node=tty behavior=kernel describes a terminal device node.Related terms
- /dev — The directory holding device nodes: special files through which programs reach disks, terminals and other devices.
- device driver — Kernel code that knows how to operate one kind of hardware and presents it to the rest of the system through a standard interface.
- block device — A storage device, such as a disk or a partition, that the kernel reads and writes in fixed-size blocks.
- everything is a file — The Unix design idea that many kinds of objects, such as devices, processes and kernel settings, are reached through the same open, read and write operations as files.
Taught in
- Everything Is A File: proc, sys And dev — Linux Fundamentals & Systems Administration