FreeKB - Linux Fundamentals sysfs (System File System)
Linux Fundamentals - sysfs (System File System)

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

Add a Comment

We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.

Please enter 2e731 in the box below so that we can be sure you are a human.


Web design by yours truely - me, myself, and I   |   |