/sys
Cheat sheet · https://pcornel.dk/topic.php?topic=2670
Answer
/sys is a virtual filesystem (sysfs) that exposes the kernel's view of devices, drivers, buses and kernel settings as files.
Remember
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.
First checks
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
Verify in this order
/sys mounted (or virtual) → correct owner and permissions → enough space → services read and write as intended
Where it usually breaks
First mismatch in hardware/block device → kernel driver/mapper/RAID/LVM → filesystem → mount namespace/options → path permissions/MAC → consumer I/O; preserve identity/native diagnostic/pre-state before mutation.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=2670