Frequently Asked Question

What is /sys and how is it different from /proc?

/sys is another virtual filesystem, but its job is to expose the kernel's device model: a tidy, structured tree of every bus, device, and driver the kernel knows about. Under /sys/class/net/ you find one directory per network interface; under /sys/block/ one per block device; under /sys/devices/ the raw topology, mirroring how the hardware is physically wired. Most files are readable knobs (/sys/class/net/eth0/mtu shows the MTU) and some are writable (writing a number to /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq caps that CPU's frequency).

Roughly: /proc was the original 1990s catch-all and is now used mostly for process information and a few legacy globals, while /sys was introduced in 2.6 (2003) as a structured replacement for the device half of /proc. The udev daemon watches /sys for device add/remove events and reacts by creating nodes in /dev, loading firmware, and running rules.

Further reading and video