Unix Philosophy
The Unix philosophy is a set of cultural norms for developing software that emerged over time from the leading developers of Unix. It characterises the modular design of Unix systems.
At its core, the Unix philosophy dictates that the operating system should provide a set of simple tools, with each tool performing a limited, well-defined function.
Key ideas central to this philosophy include:
- "Make each program do one thing well"
- "Write programs that work together"
- "Write programs that handle text streams", meaning that everything is treated as text. This allows for simpler programs that can interact with a wider variety of inputs and outputs.
Brian Kernighan and Rob Pike summarised this philosophy as "the idea that the power of a system comes more from the relationships among programs than from the programs themselves". This power is largely facilitated by a unified and inode-based filesystem and the use of "pipes" as the main means of inter-process communication. A shell scripting and command language, known as the Unix shell, then allows these simple tools to be combined to perform complex tasks.
This approach was partly a result of the modest hardware available when Unix was first developed. The limited processor speed and memory enforced a "minimality of mechanisms" and a "search for generalizations". For example, the file system interface was designed to be straightforward and could be applied to various tasks, including reading and writing to different devices as if they were ordinary disk files.
Even today, many systems adhere to this philosophy of using small, simple tools that can be combined to achieve complex operations. Programs referred to as "modern Unix" tools are typically those that align with the Unix philosophy, run within the Unix architecture, and are executed from a Unix shell.