Use it to find a disk or device, or when a device node is missing or has the wrong permissions.
/dev
/dev contains device files that represent hardware and virtual devices (disks /dev/sda, /dev/nvme0n1, terminals, /dev/null). It is a devtmpfs managed by the kernel and udev.
1. ls -ld /dev and findmnt /dev — present and mounted where expected?
2. df -h /dev — space left? df -i /dev — inodes left?
3. Find large or unexpected content: du -xh --max-depth=1 /dev | sort -h | tail.
4. Permissions and owner as the FHS and services expect?
5. Fix space, permissions or mount, then retest the service.
/dev mounted (or virtual) → correct owner and permissions → enough space → services read and write as intended
For Filesystem → /dev, continue with the first unproven Topic check: Capture file type plus major/minor numbers and map the node to sysfs/udev/device identity. If that boundary is healthy, advance to the adjacent check: Use stable identifiers where required instead of assuming enumeration names are persistent. Preserve the same host/time/identity scope and rerun the original workload before accepting recovery.
Continue only after interpreting the current observation.Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
lsblkVerification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Operational evidence path Verify boundary
hardware/virtual resource → kernel driver/device → sysfs identity → udev/devtmpfs node → permissions/cgroup/device policy → consumer open/ioctl/I/O → result
Healthy evidence: the node major/minor maps to the intended kernel device, policy permits access and the exact consumer operation succeeds.
Step 2 Verification and output interpretation Verify boundary
Existing fast checks for this Topic. - Capture file type plus major/minor numbers and map the node to sysfs/udev/device identity.
- Use stable identifiers where required instead of assuming enumeration names are persistent.
- Separate device-node permissions from driver binding, transport/path state and upper filesystem/mount state.
- Verify the exact read/write/control operation required by the consumer.
Verification chain. hardware/virtual resource → kernel driver/device → sysfs identity → udev/devtmpfs node → permissions/cgroup/device policy → consumer open/ioctl/I/O → result
Step 3 Commands Verify boundary
ls -l /dev/sda /dev/null
lsblk
Step 4 Failure modes and next checks Narrow the fault
Suspicious evidence: node presence is treated as hardware health, unstable /dev names are used as durable identity, or filesystem/storage faults are inferred solely from a device node.
/dev shows the exposed device endpoint and metadata, but it does not show driver health, storage/media state, mount state or workload success.
Next check: Continue from the first step that has not been verified: preserve the same process mount namespace, resolve the path and mount crossings, identify the exact object/inode or live pseudo/device endpoint, inspect effective access/capacity, then repeat the original consumer operation before changing unrelated filesystem state.
Step 5 Branching troubleshooting Narrow the fault
Concrete boundaries: process credentials/namespace → path/mount lookup → DAC/ACL/LSM → filesystem metadata → block/device/backend → completion/read-back.
Step 6 Common mistakes Narrow the fault
- Writing to the wrong device node.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
Device names (sda, sdb) can change between boots — use /dev/disk/by-uuid or by-id in configuration. Permissions on device nodes are set by udev rules.
ls -ld <path>— owner, permissions and typestat <path>— inode, links, size and timestampsdf -h <path>— filesystem and free spacefindmnt <path>— which mount the path is on
ReferenceWhat it is1 section · depth on demand
Core model
Identify the device-node type and major/minor identity, map it to the kernel device/driver and underlying hardware or virtual resource, then verify permissions and an actual consumer operation. Device-node existence is a namespace fact, not evidence that hardware is present, healthy or suitable for I/O.
ReferenceWhy it matters1 section · depth on demand
Overview
/dev contains device nodes created dynamically by the kernel (devtmpfs) and udev.
| Node | Meaning |
|---|---|
/dev/sda, /dev/nvme0n1 | Disks |
/dev/mapper/*, /dev/dm-* | Device-mapper (LVM, LUKS, multipath) |
/dev/disk/by-id|by-uuid|by-path | Stable symlinks |
/dev/null, /dev/zero, /dev/urandom | Special character devices |
/dev/shm | Shared memory (tmpfs) |
/dev/tty*, /dev/pts/* | Terminals |
ls -l /dev/sda /dev/null # b = block, c = character; major, minor numbers
udevadm info /dev/sda
ReferenceImportant terms & boundaries5 sections · depth on demand
What this shows and what it does not
/dev shows the exposed device endpoint and metadata, but it does not show driver health, storage/media state, mount state or workload success.
Trace this Topic using stable identifiers through process/unit → namespace/credentials/cgroup → kernel socket/device/filesystem state → dependency → original workload.
In depth
/dev: device files
The hier(7) manual page describes /dev as the place for special or device files, which refer to physical devices. On modern systems, /dev is a devtmpfs file system populated by the kernel, and udev adds permissions, symlinks and persistent names. Programs talk to hardware by opening these files.
Kinds of device files
| Type | ls -l letter | Examples |
|---|---|---|
| Block device | b | /dev/sda, /dev/nvme0n1p1, /dev/dm-0 |
| Character device | c | /dev/tty1, /dev/null, /dev/random, /dev/ttyUSB0 |
| Symlinks created by udev | l | /dev/disk/by-uuid/..., /dev/mapper/vg0-root |
Useful special devices
| Device | Purpose |
|---|---|
/dev/null | Discards writes; reads return end of file |
/dev/zero | Endless zero bytes |
/dev/urandom, /dev/random | Random bytes |
/dev/full | Writes fail with "no space" (testing) |
/dev/tty | The current process's controlling terminal |
/dev/shm | Shared memory (a tmpfs) |
Persistent names
Kernel names like /dev/sdb depend on detection order and can change between boots. udev's symlinks are stable. Use them in fstab, scripts and multipath configurations.
| Directory | Identifies by |
|---|---|
/dev/disk/by-uuid/ | File system UUID |
/dev/disk/by-id/ | Model and serial number, WWN |
/dev/disk/by-path/ | Physical connection (controller, port) |
/dev/disk/by-label/ | File system label |
host$ ls -l /dev/null /dev/nvme0n1 /dev/tty1
crw-rw-rw- 1 root root 1, 3 Nov 28 08:59 /dev/null
brw-rw---- 1 root disk 259, 0 Nov 28 08:59 /dev/nvme0n1
crw--w---- 1 root tty 4, 1 Nov 28 08:59 /dev/tty1
host$ ls -l /dev/disk/by-id/ | grep -v part | head -3
host$ findmnt /dev
TARGET SOURCE FSTYPE OPTIONS
/dev udev devtmpfs rw,nosuid,relatime,size=8131208k,nr_inodes=2032802,mode=755
host$ udevadm info --query=property --name=/dev/nvme0n1 | grep -E "ID_MODEL|ID_SERIAL_SHORT|ID_WWN"
host$ stat -c '%t:%T %n' /dev/nvme0n1
Major and minor numbers
The two numbers in ls -l (for example 259, 0) are the major and minor device numbers. The major identifies the driver, and the minor the individual device. They match the entries under /sys/dev/block/ and /sys/dev/char/. The device's group, for example disk or tty, decides who may open it.
Documented example, not captured output.
How it works at runtime
/dev is part of Filesystem → /dev. /dev exposes device nodes and special endpoints used by user space to access kernel-managed devices; on modern Linux it is typically a dynamic devtmpfs/udev-managed namespace containing block, character and selected pseudo devices.
Topic-specific state model. /dev exposes device nodes and special endpoints used by user space to access kernel-managed devices; on modern Linux it is typically a dynamic devtmpfs/udev-managed namespace containing block, character and selected pseudo devices.
Technical metadata. Process PID/session/container/chroot and mount-namespace identity, absolute/relative pathname, root mount, path components, mount points and filesystem/source type, symlink target chain, filesystem/device identity, inode number, file type/mode, UID/GID/ACL/security context where relevant, link count, size/timestamps, block and inode capacity, pseudo-filesystem/kernel object identity, device major/minor, process/socket/open-file references, package/service ownership, effective consumer identity and original workload result.
Interpretation rule. - Device node exists ≠ backing hardware/device is healthy or even still present.
- /dev node name ≠ stable hardware identity; enumeration names can change across boots or discovery order.
- Block device node ≠ mounted filesystem, filesystem health or safe-to-write target.
- Permission to open a device ≠ the requested ioctl/I/O operation will succeed.
Mechanics
Preserve host, distribution/release, kernel, namespace/container, user/group, unit, path/device, interface/address, PID/cgroup and security-label identity where applicable.
Limits and how it fails
Primary failure point. /dev shows the exposed device endpoint and metadata, but it does not show driver health, storage/media state, mount state or workload success.
Boundary chain: process credentials/namespace → path/mount lookup → DAC/ACL/LSM → filesystem metadata → block/device/backend → completion/read-back.
ReferenceConfiguration & state2 sections · depth on demand
Configuration, persistence and lifecycle
Distribution/platform context. /dev owns device-node semantics. Device discovery/driver internals, Storage, permissions and container device policy remain in the relevant Topics.
Lifecycle
Retirement is part of correctness: disable and remove obsolete units/config fragments, detach consumers before unmount/device removal, clean stale credentials/keys/rules only after dependency review, and verify no boot-time or scheduled mechanism recreates the old state.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Filesystem → /dev. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html · confidence 94%What changed and what may be affected
Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
/dev operational reference
Topic-specific lookup boundaries, proof limits and next-step Evidence for /dev.
| Lookup boundary | Topic-specific reference | Operational use |
|---|---|---|
| Scope / effective state | /dev exposes device nodes and special endpoints used by user space to access kernel-managed devices; on modern Linux it is typically a dynamic devtmpfs/udev-managed namespace containing block, character and selected pseudo devices. | Establish exactly what this Topic owns before crossing into another subsystem. |
| Fast verification | Pin process/container mount namespace → resolve the exact path from / and record every mount crossing → identify final dentry + filesystem/device + inode + file type → capture ownership/mode/ACL and capacity where relevant → map pseudo/device/runtime objects to the live kernel/process endpoint → verify the original consumer read/write/execute/service result. | Use the shortest evidence path first; a fast check is a boundary test, not blanket proof. |
| Verification chain | hardware/virtual resource → kernel driver/device → sysfs identity → udev/devtmpfs node → permissions/cgroup/device policy → consumer open/ioctl/I/O → result | Trace requested/configured state through effective state to the observed workload result. |
| Failure boundary | /dev proves the exposed device endpoint and metadata; it does not independently prove driver health, storage/media state, mount state or workload success. | Stop broad troubleshooting at the first boundary that is not supported by evidence. |
| Positive evidence | Correlated namespace, path and object evidence can establish this Linux Filesystem proof path: hardware/virtual resource → kernel driver/device → sysfs identity → udev/devtmpfs node → permissions/cgroup/device policy → consumer open/ioctl/I/O → result | Use this observation only for the specific claim it actually supports. |
| Evidence limit | It does not independently prove behavior outside the captured namespace, mount, inode/object, authorization, backing-resource or consumer scope. /dev proves the exposed device endpoint and metadata; it does not independently prove driver health, storage/media state, mount state or workload success. | Do not promote a local success signal into end-to-end or adjacent-dependency proof. |
| Next troubleshooting check | Continue from the first unproven boundary: preserve the same process mount namespace, resolve the path and mount crossings, identify the exact object/inode or live pseudo/device endpoint, inspect effective access/capacity, then repeat the original consumer operation before changing unrelated filesystem state. | Continue to the next unresolved boundary while preserving the original test condition. |
/dev · operational reference
Compact Linux state, persistence, verification and boundary reference for fast lookup.
| Reference boundary | /dev |
|---|---|
| Topic path | Filesystem → /dev |
| Runtime state | /dev exposes device nodes and special endpoints used by user space to access kernel-managed devices; on modern Linux it is typically a dynamic devtmpfs/udev-managed namespace containing block, character and selected pseudo devices. |
| Fast checks | - Capture file type plus major/minor numbers and map the node to sysfs/udev/device identity. - Use stable identifiers where required instead of assuming enumeration names are persistent. - Separate device-node permissions from driver binding, transport/path state and upper filesystem/mount state. - Verify the exact read/write/control operation required by the consumer. |
| Verification chain | hardware/virtual resource → kernel driver/device → sysfs identity → udev/devtmpfs node → permissions/cgroup/device policy → consumer open/ioctl/I/O → result Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return/regression → explicit Evidence boundary. Boundary chain: local authoritative state → adjacent dependency → effective/programmed state → original workload/request → return path or regression → explicit Evidence boundary. |
| Failure boundary | /dev proves the exposed device endpoint and metadata; it does not independently prove driver health, storage/media state, mount state or workload success. Boundary chain: process credentials/namespace → path/mount lookup → DAC/ACL/LSM → filesystem metadata → block/device/backend → completion/read-back. |
| Persistence rule | Prove which configuration source owns the state, then prove that the running consumer loaded or generated the intended state. |
Deep reference
Healthy vs suspicious evidence
Output interpretation
Capture host, distribution/kernel, namespace/container, exact user/unit/path/device/interface/PID identity, timestamp, native state/reason, exit status or errno, relevant counters and the independent read-back result.