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.

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

block

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

bus

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.

class

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

devices

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.

firmware

Contains subdirectories for firmware objects.

module

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”.
power

Contains attributes that control the system's power state.


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