DevOps in Linux — /sys/devices Directory

Deep dive into Linux /sys directory

Tony
4 min readJun 6, 2023

--

Note, full mind map is available at: “DevOps in Linux Mind Map

/sys/devices

What is /sys/devices

In Linux server, the /sys/devices directory specifically contains information about the devices recognized by the system. These devices can be physical hardware devices or logical, virtual devices. The directory hierarchy under /sys/devices reflects the device hierarchy, with subdirectories representing devices, their subsystems, and the individual components of each device.

In /sys/devices directory, you can gather information about the devices on your system, their attributes, and their current state. You can also interact with some devices by writing to specific files, allowing you to modify certain settings or control the devices in various ways.

Note, modifying files in the /sys directory can have unintended consequences and may cause your system to become unstable or unresponsive if done incorrectly.

Here’s an example of /sys/devices directory:

$ tree -L 1 /sys/devices/
/sys/devices/
├── breakpoint
├── kprobe
├── LNXSYSTM:00
├── msr
├── pci0000:00
├── platform
├── pnp0
├── software
├── system
├── tracepoint
├──…

--

--