Demystifying the "Everything Is a File" Concept
The Great Abstraction
A deep dive into Linux's "everything is a file" philosophy, exploring how file descriptors, VFS, /proc, and /sys turn complex hardware and kernel states into simple text.
Linux has a deceptively simple idea at its heart: Treat as many things as possible like files. It sounds straightforward, but how can it be true?
Your documents are files, obviously. But so are your keyboard and hard drive, at least from Linux's point of view. Information about your processor appears in files, and so do details about the various connected devices.
While "everything is a file" isn't literally true, because Linux isn't magically turning hardware into digital documents, it is one of the most useful mental shortcuts for understanding the system. The phrase describes a design philosophy Linux inherited from Unix: Provide a common interface for interacting with very different resources.
[...]
Buy this article as PDF
(incl. VAT)