O'Reilly logo

CLI for Noobies: A Primer on the Linux Command Line by Joe Barr

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required