The Unix philosophy, originated by
Ken Thompson
Kenneth Lane Thompson (born February 4, 1943) is an American pioneer of computer science. Thompson worked at Bell Labs for most of his career where he designed and implemented the original Unix operating system. He also invented the B (programmi ...
, is a set of cultural norms and philosophical approaches to
minimalist
In visual arts, music, and other media, minimalism is an art movement that began in the post-war era in western art. The movement is often interpreted as a reaction to abstract expressionism and modernism; it anticipated contemporary post-mi ...
,
modular software development
Software development is the process of designing and Implementation, implementing a software solution to Computer user satisfaction, satisfy a User (computing), user. The process is more encompassing than Computer programming, programming, wri ...
. It is based on the experience of leading developers of the
Unix
Unix (, ; trademarked as UNIX) is a family of multitasking, multi-user computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, a ...
operating system
An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs.
Time-sharing operating systems scheduler (computing), schedule tasks for ...
. Early Unix developers were important in bringing the concepts of modularity and reusability into software engineering practice, spawning a "
software tools
A programming tool or software development tool is a computer program that is used to software development, develop another computer program, usually by helping the developer manage computer files. For example, a programmer may use a tool called ...
" movement. Over time, the leading developers of Unix (and programs that ran on it) established a set of cultural norms for developing software; these norms became as important and influential as the technology of Unix itself, and have been termed the "Unix philosophy."
The Unix philosophy emphasizes building simple, compact, clear, modular, and
extensible code that can be easily maintained and repurposed by developers other than its creators. The Unix philosophy favors
composability as opposed to
monolithic design.
Origin
The Unix philosophy is documented by
Doug McIlroy
Malcolm Douglas McIlroy (born 1932) is an American mathematician, engineer, and programmer. As of 2019 he is an Adjunct Professor of Computer Science at Dartmouth College.
McIlroy is best known for having originally proposed Unix pipelines and de ...
in the
Bell System Technical Journal
The ''Bell Labs Technical Journal'' was the in-house scientific journal for scientists of Bell Labs, published yearly by the IEEE society.
The journal was originally established as ''The Bell System Technical Journal'' (BSTJ) in New York by the Am ...
from 1978:
# Make each program do one thing well. To do a new job, build afresh rather than complicate old programs by adding new "features".
# Expect the output of every program to become the input to another, as yet unknown, program. Don't clutter output with extraneous information. Avoid stringently columnar or binary input formats. Don't insist on interactive input.
# Design and build software, even operating systems, to be tried early, ideally within weeks. Don't hesitate to throw away the clumsy parts and rebuild them.
# Use tools in preference to unskilled help to lighten a programming task, even if you have to detour to build the tools and expect to throw some of them out after you've finished using them.
It was later summarized by
Peter H. Salus in A Quarter-Century of Unix (1994):
* 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.
In their Unix paper of 1974, Ritchie and Thompson quote the following design considerations:
* Make it easy to write, test, and run programs.
* Interactive use instead of
batch processing
Computerized batch processing is a method of running software programs called jobs in batches automatically. While users are required to submit the jobs, no other interaction by the user is required to process the batch. Batches may automatically ...
.
*
Economy
An economy is an area of the Production (economics), production, Distribution (economics), distribution and trade, as well as Consumption (economics), consumption of Goods (economics), goods and Service (economics), services. In general, it is ...
and
elegance
Elegance is beauty that shows unusual effectiveness and simplicity.
Elegance is frequently used as a standard of Taste (sociology), tastefulness, particularly in visual design, decorative arts, literature, science, and Mathematical beauty, the ...
of design due to size constraints ("salvation through suffering").
*
Self-supporting system: all Unix software is maintained under Unix.
Parts
''The UNIX Programming Environment''
In their preface to the 1984 book, ''
The UNIX Programming Environment'',
Brian Kernighan
Brian Wilson Kernighan (; born January 30, 1942) is a Canadian computer scientist.
He worked at Bell Labs and contributed to the development of Unix alongside Unix creators Ken Thompson and Dennis Ritchie. Kernighan's name became widely known ...
and
Rob Pike
Robert Pike (born 1956) is a Canadian programmer and author.
He is best known for his work on the Go programming language while working at Google
and the Plan 9 operating system while working at Bell Labs, where he was a member of the Unix t ...
, both from
Bell Labs
Nokia Bell Labs, commonly referred to as ''Bell Labs'', is an American industrial research and development company owned by Finnish technology company Nokia. With headquarters located in Murray Hill, New Jersey, Murray Hill, New Jersey, the compa ...
, give a brief description of the Unix design and the Unix philosophy:
[Kernighan, Brian W. Pike, Rob. ''The UNIX Programming Environment.'' 1984. viii]

The authors further write that their goal for this book is "to communicate the UNIX programming philosophy."
''Program Design in the UNIX Environment''

In October 1984, Brian Kernighan and Rob Pike published a paper called ''Program Design in the UNIX Environment''. In this paper, they criticize the accretion of program options and features found in some newer Unix systems such as
4.2BSD and
System V
Unix System V (pronounced: "System Five") is one of the first commercial versions of the Unix operating system. It was originally developed by AT&T and first released in 1983. Four major versions of System V were released, numbered 1, 2, 3, an ...
, and explain the Unix philosophy of software tools, each performing one general function:
The authors contrast Unix tools such as with larger program suites used by other systems.
Doug McIlroy on Unix programming
McIlroy, then head of the Bell Labs Computing Sciences Research Center, and inventor of the
Unix pipe
In Unix-like computer operating systems, a pipeline is a mechanism for inter-process communication using message passing. A pipeline is a set of process (computing), processes chained together by their standard streams, so that the output text of ...
, summarized the Unix philosophy as follows:
Beyond these statements, he has also emphasized simplicity and
minimalism
In visual arts, music, and other media, minimalism is an art movement that began in the post-war era in western art. The movement is often interpreted as a reaction to abstract expressionism and modernism; it anticipated contemporary post-mi ...
in Unix programming:
Conversely, McIlroy has criticized modern
Linux
Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
as having
software bloat
Software bloat is a process whereby successive versions of a computer program become perceptibly slower, use more memory, disk space or processing power, or have higher hardware requirements than the previous version, while making only dubious ...
, remarking that, "adoring admirers have fed Linux goodies to a disheartening state of
obesity
Obesity is a medical condition, considered by multiple organizations to be a disease, in which excess Adipose tissue, body fat has accumulated to such an extent that it can potentially have negative effects on health. People are classifi ...
." He contrasts this with the earlier approach taken at Bell Labs when developing and revising
Research Unix
Research Unix refers to the early versions of the Unix operating system for DEC PDP-7, PDP-11, VAX and Interdata 7/32 and 8/32 computers, developed in the Bell Labs Computing Sciences Research Center (CSRC). The term ''Research Unix'' first app ...
:
Do One Thing and Do It Well
As stated by McIlroy, and generally accepted throughout the Unix community, Unix programs have always been expected to follow the concept of DOTADIW, or "Do One Thing And Do It Well." There are limited sources for the acronym DOTADIW on the Internet, but it is discussed at length during the development and packaging of new operating systems, especially in the Linux community.
Patrick Volkerding
Patrick Volkerding (born October 20, 1966) is the founder and maintainer of the Slackware Linux distribution. Volkerding is Slackware's " Benevolent Dictator for Life" (BDFL), and is also known informally as "The Man".
Personal life
Volkerding e ...
, the project lead of
Slackware Linux
Slackware is a Linux distribution created by Patrick Volkerding in 1993. Originally based on Softlanding Linux System (SLS), Slackware has been the basis for many other Linux distributions, most notably the first versions of SUSE Linux distribu ...
, invoked this design principle in a criticism of the
systemd
systemd is a software suite that provides an array of system components for Linux operating systems. The main aim is to unify service configuration and behavior across Linux distributions. Its primary component is a "system and service manage ...
architecture, stating that, "attempting to control services, sockets, devices, mounts, etc., all within one
daemon
A demon is a malevolent supernatural being, evil spirit or fiend in religion, occultism, literature, fiction, mythology and folklore.
Demon, daemon or dæmon may also refer to:
Entertainment Fictional entities
* Daemon (G.I. Joe), a character ...
flies in the face of the Unix concept of doing one thing and doing it well."
Eric Raymond's 17 Unix Rules
In his book ''
The Art of Unix Programming'' that was first published in 2003,
Eric S. Raymond
Eric Steven Raymond (born December 4, 1957), often referred to as ESR, is an American software developer, open-source software advocate, and author of the 1997 essay and 1999 book ''The Cathedral and the Bazaar''. He wrote a guidebook for the R ...
(open source advocate and programmer) summarizes the Unix philosophy as
KISS Principle
KISS, an acronym for "Keep it simple, stupid!", is a design principle first noted by the U.S. Navy in 1960. First seen partly in American English by at least 1938, KISS implies that simplicity should be a design goal. The phrase has been associate ...
of "Keep it Simple, Stupid." He provides a series of design rules:
* Build
modular programs
* Write readable programs
* Use composition
*
Separate mechanisms from policy
* Write simple programs
* Write small programs
* Write transparent programs
* Write robust programs
* Make data complicated when required, not the program
* Build on potential users' expected knowledge
* Avoid unnecessary output
* Write programs which fail in a way that is easy to diagnose
* Value developer time over machine time
* Write
abstract programs that generate code instead of writing code by hand
*
Prototype
A prototype is an early sample, model, or release of a product built to test a concept or process. It is a term used in a variety of contexts, including semantics, design, electronics, and Software prototyping, software programming. A prototype ...
software before polishing it
* Write flexible and open programs
* Make the program and protocols extensible.
Mike Gancarz: The UNIX Philosophy
In 1994,
Mike Gancarz, a member of
Digital Equipment Corporation
Digital Equipment Corporation (DEC ), using the trademark Digital, was a major American company in the computer industry from the 1960s to the 1990s. The company was co-founded by Ken Olsen and Harlan Anderson in 1957. Olsen was president until ...
's Unix Engineering Group (UEG), published ''The UNIX Philosophy'' based on his own Unix (
Ultrix
Ultrix (officially all-caps ULTRIX) is the brand name of Digital Equipment Corporation's (DEC) discontinued native Unix operating systems for the PDP-11, VAX, MicroVAX and DECstations.
History
The initial development of Unix occurred on DEC eq ...
) port development at DEC in the 1980s and discussions with colleagues. He is also a member of the
X Window System
The X Window System (X11, or simply X) is a windowing system for bitmap displays, common on Unix-like operating systems.
X originated as part of Project Athena at Massachusetts Institute of Technology (MIT) in 1984. The X protocol has been at ...
development team and author of
Ultrix Window Manager
The Ultrix Window Manager (uwm) is a historic standard window manager software for the X Window System from X11R1 through X11R3 releases. In fact, it was the only X11-compatible window manager as of X11R1.
History
The Ultrix Window Manager w ...
(uwm).
The book focuses on porting UNIX to different computers during the
Unix wars
The Unix wars were struggles between vendors to set a standard for the Unix operating system in the late 1980s and early 1990s.
Origins
Both AT&T Corporation and University of California, Berkeley are important in the early history of Unix. Al ...
of the 1980s and describes his philosophy that portability should be more important than the efficiency of using non-standard interfaces for hardware and graphics devices.
The nine basic "tenets" he claims to be important are
# Small is beautiful.
# Make each program do one thing well.
# Build a prototype as soon as possible.
# Choose portability over efficiency.
# Store data in flat
text file
A text file (sometimes spelled textfile; an old alternative name is flat file) is a kind of computer file that is structured as a sequence of lines of electronic text. A text file exists stored as data within a computer file system.
In ope ...
s.
# Use software leverage to your advantage.
# Use
shell script
A shell script is a computer program designed to be run by a Unix shell, a command-line interpreter. The various dialects of shell scripts are considered to be command languages. Typical operations performed by shell scripts include file manipu ...
s to increase leverage and portability.
# Avoid captive user interfaces.
# Make every program a
filter.
"Worse is better"
Richard P. Gabriel suggests that a key advantage of Unix was that it embodied a design philosophy he termed "worse is better", in which simplicity of both the interface and the implementation are more important than any other attributes of the system—including correctness, consistency, and completeness. Gabriel argues that this design style has key evolutionary advantages, though he questions the quality of some results.
For example, in the early days Unix used a
monolithic kernel
A monolithic kernel is an operating system software architecture, architecture with the entire operating system running in kernel space. The monolithic model differs from other architectures such as the microkernel in that it alone defines a high ...
(which means that user processes carried out kernel system calls all on the user stack). If a signal was delivered to a process while it was blocked on a long-term
I/O in the kernel, the handling of the situation was unclear. The signal handler could not be executed when the process was in kernel mode, with sensitive kernel data on the stack.
Criticism
In a 1981 article entitled "The truth about Unix: ''The user interface is horrid''" published in ''
Datamation
''Datamation'' is a computer magazine that was published in print form in the United States between 1957 and 1998, '',
Don Norman
Donald Arthur Norman (born December 25, 1935) is an American researcher, professor, and author. Norman is the director of The Design Lab at University of California, San Diego. He is best known for his books on design, especially '' The Design o ...
criticized the design philosophy of Unix for its lack of concern for the user interface. Writing from his background in cognitive science and from the perspective of the then-current philosophy of
cognitive engineering,
he focused on how end-users comprehend and form a personal
cognitive model
A cognitive model is a representation of one or more cognitive processes in humans or other animals for the purposes of comprehension and prediction. There are many types of cognitive models, and they can range from box-and-arrow diagrams to a se ...
of systems—or, in the case of Unix, fail to understand, with the result that disastrous mistakes (such as losing an hour's worth of work) are all too easy.
In the podcast On the Metal, game developer
Jonathan Blow
Jonathan Blow (born 1971) is an American video game designer and programmer. He is best known for his work on the independent video games ''Braid'' (2008) and '' The Witness'' (2016). Blow became interested in game programming while at middle ...
criticised UNIX philosophy as being outdated.
He argued that tying together modular tools results in very inefficient programs. He says that UNIX philosophy suffers from similar problems to
microservices
In software engineering, a microservice architecture is an architectural pattern that organizes an application into a collection of loosely coupled, fine-grained services that communicate through lightweight protocols. This pattern is characterize ...
: without overall supervision, big architectures end up ineffective and inefficient.
See also
*
Cognitive engineering
*
Unix architecture
*
Minimalism (computing)
In computing, minimalism refers to the application of minimalist philosophies and principles in the design and use of hardware and software. Minimalism, in this sense, means designing systems that use the least hardware and software resources ...
*
Software engineering
Software engineering is a branch of both computer science and engineering focused on designing, developing, testing, and maintaining Application software, software applications. It involves applying engineering design process, engineering principl ...
*
KISS principle
KISS, an acronym for "Keep it simple, stupid!", is a design principle first noted by the U.S. Navy in 1960. First seen partly in American English by at least 1938, KISS implies that simplicity should be a design goal. The phrase has been associate ...
*
Hacker ethic
The hacker ethic is a philosophy and set of moral values within hacker culture. Practitioners believe that sharing information and data with others is an ethical imperative. The hacker ethic is related to the concept of freedom of information ...
*
List of software development philosophies
This is a list of approaches, styles, methodologies, and philosophies in software development and engineering. It also contains programming paradigms, software development methodologies, software development processes, and single practices, prin ...
*
Everything is a file
"Everything is a file" is an approach to interface design in Unix derivatives.
While this turn of phrase does not as such figure as a Unix design principle or philosophy,
it is a common way to analyse designs, and informs the design of new interfa ...
*
Worse is better
''Worse is better'' (also called the ''New Jersey style'') is a term conceived by Richard P. Gabriel in a 1989 essay to describe the dynamics of software acceptance. It refers to the argument that software quality does not necessarily increase w ...
Notes
References
*
The Unix Programming Environment' by
Brian Kernighan
Brian Wilson Kernighan (; born January 30, 1942) is a Canadian computer scientist.
He worked at Bell Labs and contributed to the development of Unix alongside Unix creators Ken Thompson and Dennis Ritchie. Kernighan's name became widely known ...
and
Rob Pike
Robert Pike (born 1956) is a Canadian programmer and author.
He is best known for his work on the Go programming language while working at Google
and the Plan 9 operating system while working at Bell Labs, where he was a member of the Unix t ...
, 1984
*
Program Design in the UNIX Environment' – The paper by Pike and Kernighan that preceded the book.
''Notes on Programming in C'' Rob Pike, September 21, 1989
* ''A Quarter Century of Unix'', Peter H. Salus, Addison-Wesley, May 31, 1994 ()
— fro
''The Art of Unix Programming'' Eric S. Raymond, Addison-Wesley, September 17, 2003 ()
by M. D. Schroeder, D. D. Clark, J. H. Saltzer, and D. H. Wells, 1977.
* ''The UNIX Philosophy'', Mike Gancarz,
External links
– by Catb.org
– by The Linux Information Project (LINFO)
Why the Unix Philosophy still mattersFast food stand adopts the "UNIX philosophy"
{{Unix
Software development philosophies
Unix