Understanding devices in Linux
As already stated on several occasions in this book, everything in Linux is a file. This includes devices, too. Device files are special files in UNIX and Linux operating systems. Those special files are basically an interface to device drivers, and they are present in the filesystem as a regular file.
Linux abstraction layers
Now is as good a time as any to discuss Linux system abstraction layers and how devices fit into the overall picture. A Linux system is generally organized on three major levels: the hardware level, kernel level, and user space level.
The hardware level contains the hardware components of your machine, such as the memory (RAM), Central Processing Unit (CPU), and devices including disks, network interfaces, ports, and controllers. The memory is divided into two separate regions, called kernel space and user space.
The kernel is the beating heart of the Linux operating system. The kernel resides inside the memory (RAM...