5.3 About the /sys Virtual File System

5.3.1 Virtual Directories Under /sys

In addition to /proc, the kernel exports information to the /sys virtual file system (sysfs). Programs such as the dynamic device manager, udev, use /sys to access device and device driver information. The implementation of /sys has helped to tidy up the /proc file system as most hardware information has been moved to /sys.


/sys exposes kernel data structures and control points, which implies that it might contain circular references, where a directory links to an ancestor directory. As a result, a find command used on /sys might never terminate.

5.3.1 Virtual Directories Under /sys

The following table lists the most useful virtual directories under the /sys directory hierarchy.

Table 5.2 Useful Virtual Directories Under /sys

Virtual DirectoryDescription


Contains subdirectories for block devices. For example: /sys/block/sda.


Contains subdirectories for each supported physical bus type, such as pci, pcmcia, scsi, or usb. Under each bus type, the devices directory lists discovered devices, and the drivers directory contains directories for each device driver.


Contains subdirectories for every class of device that is registered with the kernel.


Contains the global device hierarchy of all devices on the system. The platform directory contains peripheral devices such as device controllers that are specific to a particular platform. The system directory contains non-peripheral devices such as CPUs and APICs. The virtual directory contains virtual and pseudo devices. See Chapter 7, Device Management.


Contains subdirectories for firmware objects.


Contains subdirectories for each module loaded into the kernel. You can alter some parameter values for loaded modules. See Section 6.4, “About Module Parameters”.

Contains attributes that control the system's power state.

For more information, see https://www.kernel.org/doc/Documentation/filesystems/sysfs.txt.