From the course: Advanced Linux: The Linux Kernel

Unlock this course with a free trial

Join today to access over 24,700 courses taught by industry experts.

Introduction to /sys

Introduction to /sys

- [Instructor] Let's talk a little bit about the sys file system, which is mounted on /sys. So this should happen automatically at boot time, so you could change directory at /sys, you should see lots of stuff. Originally, sysfs was for showing how hardware is connected on your system, hardware with buses and connections is a tree structure, just like a directory, so you could walk the directory structure and walk the hardware information. It still has that and lots more. In fact, underneath sys you should probably find tens of thousands of files and directories. We're not going to talk about all of them. In fact, it's difficult to talk in any kind of breadth about the sys file system, but we're going to hit some high points for you. A couple of my favorite things underneath sys actually are the debug file system and the tracing information. When I'm working on a device driver or something like that, it's really nice to find out what's going on in the kernel, for example, tracing all…

Contents