When using the terminal, you sometimes come across a strange-looking line:

command > file 2>&1

With its mix of numbers and symbols, it almost looks like some kind of code at first glance. Many people simply memorize it and move on, knowing only that it means “redirect stdout and stderr to the same place.”

But if you look a little deeper, you’ll find that this short line contains a design that goes back a long way. Why did Unix separate stdout and stderr? Why can programs be connected with a single |? Why does Unix treat devices, pipes, and even networks as files?

If you follow these questions, they eventually lead to a single idea. Unix was not just designed as an operating system, but as a system for connecting programs together.

This series aims to explore the design ideas behind the command-line syntax we use every day. Starting from a small expression like 2>&1, we’ll follow a continuous thread through pipes, redirection, file descriptors, and ultimately the Unix philosophy of “Everything is a file.”

The short commands we type into the terminal without much thought contain ideas that are older—and more interesting—than they first appear.