mount there are listed some filesystems. I need to know what's in the
/sys. Some examples would be great!
/proc tree originated in System V Unix, where it only gave information about each running process, using a
/proc/$PID/stuff scheme. Linux greatly extended that, adding all sorts of information about the running kernel's status. In addition to these read-only information files, Linux's
/proc also has writable virtual files that can change the state of the running kernel. BSD type OSes generally do not have
/proc at all, so much of what you find under here is non-portable.
The intended solution for this mess in Linux's
/sys. Ideally, all the non-process information that got glommed into the
/proc tree should have moved to
/sys by now, but historical inertia has kept a lot of stuff in
/proc. Often there are two ways to effect a change in the running kernel: the old
/proc way, kept for backwards compatibility, and the new
/sys way that you're supposed to be using now.²
There are also several
/deventries that do not correspond to hardware devices, such as
/dev/tty. These are virtual devices that let user space programs talk to other parts of the kernel besides the running drivers in a device-like fashion.
As a rule,
/systends to be more strictly organized than
/sysmirrors the internal kernel data structures that manage the system's resources, whereas
/procgrew organically over many years, and old questionable design decisions can't change now because there are programs using those old interfaces.
/sysstarted out with a clearer design, and doesn't have to drag around as much historical baggage as