Linux Fundamentals - sysfs (System File System)

by
Jeremy Canfield |
Updated: March 21 2020
| Linux Fundamentals articles
sysfs (System File System) is a virtual file system typically mounted on /sys or /sysfs. This can be checked by using the mount command.
[user1@server1 ]# mount | grep sysfs
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
In the above output, we can see that the sysfs is mounted at /sys. We can view the contents of /sys using the ls command.
[user1@server1 ]# ls /sys
block bus class dev devices firmware fs hypervisor kernel module power
- /sys/block/ - Files for block devices, such as RAM, Hard Disk Drives, and Solid State drives
- /sys/bus/ - Files for buses on the system, such as the CPU, PCI, SCSI and USB
- /sys/class/ - Files for devices, such as bluetooth, 802.11, printers, SCSI and USB
- /sys/dev/ - There are two directories, block (for block devices) and char (for character devices)
- /sys/devices/ - Symbolic links (shortcuts) to devices
- /sys/firmware/ - Files for firmware
- /sys/fs/ - Files for each mounted filesystem, such as EXT4
- /sys/hypervisor/ - Files related to hypervisors, such as VMWare
- /sys/kernel/ - Files for the kernel
- sys/module/ - Files for every loaded module, similar to the LSMOD command
- /sys/power/ - Files related to the state of the machine, such as sleeping or hibernation
Did you find this article helpful?
If so, consider buying me a coffee over at