Definition
The Unix philosophy is a design ethos articulated by the early Bell Labs Unix team: write programs that do one thing and do it well, write programs to work together by passing data through pipes, and use text streams as the universal interface because text is the most general format that every tool can read and produce. Doug McIlroy's distilled formulation — "do one thing well, compose with pipes, prefer text" — has outlived nearly every other software-design slogan because the systems built on it have continued to outlast and outcompose monolithic alternatives for over fifty years.
The philosophy is not a constraint on what a tool can do; it is a discipline about what a tool should refuse to do. A tool that tries to be everything ends up being weakly integrable. A tool that does one thing well, with predictable inputs and outputs, becomes a building block for things its author never imagined.
Why it matters
How it works
Each tool in a Unix system reads bytes from standard input, writes bytes to standard output, and writes diagnostics to standard error. The bytes are typically text — newline-delimited records of plain ASCII or UTF-8 — because text is the lowest-common-denominator format that humans and programs can both produce and consume. A tool's job is described by what transformation it applies between stdin and stdout. The shell composes tools using the pipe operator, which connects one program's stdout to the next program's stdin through a kernel-managed buffer. Composition becomes a syntactic act: a pipeline expresses a multi-step transformation in a single line.
This composability is what gives the philosophy its power. Adding a new step to a pipeline does not require modifying the existing programs; it requires writing one more small program that obeys the same conventions. Wanting to filter logs by an unusual criterion does not require a new logging system; it requires one more grep, one more awk, or a few lines of sed. The philosophy is an instance of the broader engineering principle that the cheapest interface is the one that does nothing more than its job: input, output, and a clear definition of the transformation between them.