From the course: Exploring Linux Internals: Advanced Insights and Practical Applications

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Drivers, kernel modules, and device files

Drivers, kernel modules, and device files

- In this video, we are going to explore the relation between drivers, kernel modules, and device files. So hardware support is offered by drivers. In Linux, the drivers are presented as kernel modules and they're loaded on-demand in most cases. You'll learn much more about that in lesson five in this course. Most device nodes are represented by files in the /dev directory, and they make that in user space. There is an interface to the drivers because that's a problem here. Drivers operate in kernel space. Users cannot access kernel space and that's why the device nodes are coming in. Now, many devices only send bytes to a peripheral on the computer or receive bytes from the peripheral. Such devices work like pipes. And for that reason, they work well as character devices because it's basically a stream of character that you send to the device. All the devices work more like files. What you write to a specific location can later be retrieved from the exact same location. And these…

Contents