Chapter 5. Everything’s a File
This is the third and final file-related chapter. In it, we reveal one of the kernel’s deepest, darkest secrets.
We’ve already looked at a few file-related commands, gone over how files—in general—are organized on your system, and learned how find a file when we need it.
You’re ready for the big secret, so here it is: through the eyes of the Linux kernel, everything is a file.
Devices like modems, monitors, CD-ROMS, hard drives, even keyboards and printers are files. You (what you type on the keyboard, at least) are a file, the data that appears on your screen in response to what you’ve typed is a file, even any error messages that might result from what you’ve typed is a file.
In fact, those last three files form something ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access