Use it to read device and driver details, or change some device settings at runtime.
/sys · Filesystem
/sys is a virtual filesystem (sysfs) that exposes the kernel's view of devices, drivers, buses and kernel settings as files.
1. ls -ld /sys and findmnt /sys — present and mounted where expected?
2. df -h /sys — space left? df -i /sys — inodes left?
3. Find large or unexpected content: du -xh --max-depth=1 /sys | sort -h | tail.
4. Permissions and owner as the FHS and services expect?
5. Fix space, permissions or mount, then retest the service.
/sys mounted (or virtual) → correct owner and permissions → enough space → services read and write as intended
For Filesystem → /sys, continue with the first unproven Topic check: Identify the exact sysfs object and map it to driver/bus/device identity. If that boundary is healthy, advance to the adjacent check: Correlate sysfs state with /dev node, kernel logs and the consumer operation. 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.
Verification & 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 device → kernel object/driver → sysfs object/attribute → /dev or subsystem interface → user-space consumer → workload result
Healthy evidence: sysfs identity matches the intended device/driver, runtime attributes correlate with /dev/kernel evidence and the consumer operation succeeds.
Step 2 Verification and output interpretation Verify boundary
Existing fast checks for this Topic. - Identify the exact sysfs object and map it to driver/bus/device identity.
- Correlate sysfs state with /dev node, kernel logs and the consumer operation.
- Before writes, understand attribute semantics and operational risk.
- If persistence is required, verify the responsible persistent configuration mechanism and post-reboot/read-back state.
Verification chain. hardware/virtual device → kernel object/driver → sysfs object/attribute → /dev or subsystem interface → user-space consumer → workload result
Step 3 Commands Verify boundary
ls /sys/class/net
cat /sys/block/sda/queue/scheduler
Step 4 Failure modes and next checks Narrow the fault
Suspicious evidence: object presence is treated as hardware health, a sysfs write is assumed persistent, or kernel relationship symlinks are misread as normal filesystem layout.
/sys shows a runtime kernel object/attribute view, not device health, persistence or end-to-end usability.
Step 5 Common mistakes Narrow the fault
- Changes in
/syslost on reboot (use udev/sysctl/tuned).
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.
Changes in /sys are lost at reboot — persist them with udev rules or tmpfiles. Tools such as lsblk, ip and udevadm read /sys for you.
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
Map a user-visible device/resource to its sysfs object, driver, bus and attributes, then correlate with /dev and kernel evidence. Treat writable sysfs attributes as live control interfaces with immediate effects; persistent policy must be configured through the appropriate system mechanism rather than assumed from a one-time write.
ReferenceImportant terms & boundaries5 sections · depth on demand
What this shows and what it does not
/sys shows a runtime kernel object/attribute view, not device health, persistence or end-to-end usability.
In depth
/sys: kernel objects as files
/sys is the mount point of sysfs. The kernel's sysfs documentation describes it as a RAM-based file system that exports kernel objects, their attributes and the links between them:
- Every registered kernel object gets a directory, and the directory hierarchy mirrors the relationships between objects.
- Attributes are regular files. The rule is that each should be an ASCII text file, preferably with only one value per file.
- Writes go to the attribute's store method, which expects the whole value in a single write.
Top-level layout (documentation)
| Directory | Content |
|---|---|
block/ | Symlinks to every block device |
bus/ | One directory per bus type, with devices and drivers |
class/ | Devices grouped by function (net, block, tty, …) |
dev/ | char/ and block/ symlinks named major:minor |
devices/ | The kernel's device tree |
firmware/ | ACPI, device tree and firmware tables (e.g. efi) |
fs/ | Per-file-system attributes (cgroup, ext4, xfs) |
kernel/ | Runtime kernel settings and status |
module/ | Parameters and state of loaded modules |
power/ | Power management |
Useful attributes
| Path | Shows or sets |
|---|---|
/sys/class/net/<if>/operstate, speed, mtu | Interface state, link speed, MTU |
/sys/class/net/<if>/statistics/ | Packet and error counters |
/sys/block/<dev>/queue/scheduler | I/O scheduler (writable) |
/sys/block/<dev>/queue/rotational | 1 = spinning disk, 0 = SSD or NVMe |
/sys/module/<mod>/parameters/ | Current module parameters |
/sys/class/thermal/thermal_zone*/temp | Temperatures |
host$ cat /sys/class/net/eth0/{operstate,speed,mtu}
up
10000
1500
host$ cat /sys/class/net/eth0/statistics/rx_crc_errors
0
host$ cat /sys/block/nvme0n1/queue/{rotational,scheduler}
0
[none] mq-deadline
host$ echo mq-deadline | sudo tee /sys/block/sda/queue/scheduler
host$ readlink -f /sys/class/net/eth0
/sys/devices/pci0000:00/0000:00:1c.0/0000:03:00.0/net/eth0
host$ cat /sys/module/kvm_intel/parameters/nested
Persistent changes
Writes to /sys last only until the next reboot. Make them permanent with a udev rule (for device attributes), a module option in /etc/modprobe.d/ (for module parameters), or a systemd-tmpfiles w line. sysctl doesn't cover /sys; it only manages /proc/sys.
Documented example, not captured output.
How it works at runtime
/sys is part of Filesystem → /sys. /sys is sysfs, a kernel-generated pseudo-filesystem representing devices, drivers, buses, classes and other kernel objects through attributes and links; it is a runtime view of the kernel object model rather than persistent disk content.
Pseudo-filesystems such as /proc, /sys and many entries under /run expose generated runtime state rather than ordinary persistent files.
Topic-specific state model. /sys is sysfs, a kernel-generated pseudo-filesystem representing devices, drivers, buses, classes and other kernel objects through attributes and links; it is a runtime view of the kernel object model rather than persistent disk content.
Interpretation rule. - sysfs object exists ≠ device is healthy or usable by the workload.
- /sys path ≠ persistent storage path.
- Writing a sysfs attribute ≠ persistent configuration across reboot.
- Symlink topology in sysfs represents kernel relationships and should not be interpreted like ordinary application directory ownership.
Quick reference
/sys (sysfs) exposes the kernel's device and driver model as files — many entries are writable tunables.
cat /sys/block/sda/queue/scheduler
echo mq-deadline > /sys/block/sda/queue/scheduler
cat /sys/class/net/eth0/speed
cat /sys/class/net/eth0/statistics/rx_dropped
ls /sys/firmware/efi && echo UEFI
echo 1 > /sys/class/block/sdb/device/rescan
Writes to /sys are not persistent; use udev rules, tuned profiles or kernel parameters to make them permanent.
Limits and how it fails
Primary failure point. /sys shows a runtime kernel object/attribute view, not device health, persistence or end-to-end usability.
ReferenceConfiguration & state1 section · depth on demand
Configuration, persistence and lifecycle
Distribution/platform context. /sys owns sysfs semantics. Drivers/devices, udev, Storage, Networking and persistent configuration remain in their specialist branches.
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 → /sys. 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
/sys operational reference
Topic-specific lookup boundaries, proof limits and next-step Evidence for /sys.
| Lookup boundary | Topic-specific reference | Operational use |
|---|---|---|
| Scope / effective state | /sys is sysfs, a kernel-generated pseudo-filesystem representing devices, drivers, buses, classes and other kernel objects through attributes and links; it is a runtime view of the kernel object model rather than persistent disk content. | 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 device → kernel object/driver → sysfs object/attribute → /dev or subsystem interface → user-space consumer → workload result | Trace requested/configured state through effective state to the observed workload result. |
| Failure boundary | /sys proves a runtime kernel object/attribute view, not device health, persistence or end-to-end usability. | 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 device → kernel object/driver → sysfs object/attribute → /dev or subsystem interface → user-space consumer → workload 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. /sys proves a runtime kernel object/attribute view, not device health, persistence or end-to-end usability. | 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. |
/sys · operational reference
Compact Linux state, persistence, verification and boundary reference for fast lookup.
| Reference boundary | /sys |
|---|---|
| Topic path | Filesystem → /sys |
| Runtime state | /sys is sysfs, a kernel-generated pseudo-filesystem representing devices, drivers, buses, classes and other kernel objects through attributes and links; it is a runtime view of the kernel object model rather than persistent disk content. |
| Fast checks | - Identify the exact sysfs object and map it to driver/bus/device identity. - Correlate sysfs state with /dev node, kernel logs and the consumer operation. - Before writes, understand attribute semantics and operational risk. - If persistence is required, verify the owning persistent configuration mechanism and post-reboot/read-back state. |
| Verification chain | hardware/virtual device → kernel object/driver → sysfs object/attribute → /dev or subsystem interface → user-space consumer → workload 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 | /sys proves a runtime kernel object/attribute view, not device health, persistence or end-to-end usability. 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. |