Right, let’s talk about the three little file descriptors that run the universe. Forget APIs, forget web servers—the real magic of Unix and Linux happens in these three ancient, fundamental data streams. They’re the primordial ooze from which all command-line life evolved, and if you don’t understand them, you’re just poking at the keyboard with a stick.
Every single process you launch is automatically handed three open files: one for input, one for output, and one for dumping its complaints. We call them standard input (stdin), standard output (stdout), and standard error (stderr). Their file descriptors are 0, 1, and 2, respectively. These aren’t suggestions; they’re a contract the operating system enforces. When you run ls, it writes its beautiful list of files to descriptor 1. If it can’t read a directory, it writes its angsty error message to descriptor 2. It’s this separation of church and state—the good stuff from the bad—that makes the whole system so powerful.