UNIX philosophy

unix_philosophy.png

Introduction

Douglas McIlroy1 summarised the UNIX philosophy as follows:

  • Write programs that do one thing and do it well.
  • Write programs to work together.
  • Write programs to handle text streams, because that is a universal interface.

Philosophy?

The UNIX philosophy of “small is beautiful” and “do one thing and do it well” is often compared to the minimalist philosophy of the Zen Buddhism. The UNIX philosophy can also be compared to the philosophy of Socrates, which emphasises the importance of understanding the essence of things and not getting bogged down by unnecessary complexity.

Concepts

  • Modularity: The idea that a program or system should be broken down into smaller, self-contained components that can be easily reused and modified.
  • Simplicity: The idea that a program or system should be designed to be as simple and straightforward as possible, with minimal unnecessary complexity.
  • Text-based interfaces: The idea that programs and systems should use simple text-based interfaces that can be easily used and understood by humans, rather than more complex graphical interfaces.
  • Small, focused programs: The idea that programs should be small and focused, with a specific purpose and function, rather than large and complex.
  • Use of pipes and filters: The idea that programs should be designed to work together and accept input from, and produce output for, other programs, using pipes and filters.
  • Open-source: The idea that programs should be open-source and freely available for anyone to use and modify, rather than closed and proprietary.
  • Unix shell: A command-line interface and scripting language, which provide a powerful tool for automating tasks and connecting different programs together.

Articles