Jump to ratings and reviews
Rate this book

The UNIX Philosophy

Rate this book
* Deals with powerful concepts in a simple way * Highlights important characteristics of Operating systems and other abstract entities in a new way * Explores the tenets of the UNIX operating system philosophy

Unlike so many books that focus on how to use UNIX, The UNIX Philosophy concentrates on answering the questions: `Why use UNIX in the first place?'. Readers will discover the rationale and reasons for such concepts as file system organization, user interface and other system characteristics. In an informative, non-technical fashion, The UNIX Philosophy explores the general principles for applying the UNIX philosophy to software development. This book describes complex software design principles and addresses the importance of small programs, code and data portability, early prototyping, and open user interfaces. The UNIX Philosophy is a book to be read before tackling the highly technical texts on UNIX internals and programming. Written for both the computer layperson and the experienced programmer, this book explores the tenets of the UNIX operating system in detail, dealing with powerful concepts in a comprehensive, straightforward manner.

176 pages, Paperback

First published December 1, 1994

8 people are currently reading
130 people want to read

About the author

Mike Gancarz

6 books2 followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
37 (48%)
4 stars
21 (27%)
3 stars
17 (22%)
2 stars
1 (1%)
1 star
0 (0%)
Displaying 1 - 11 of 11 reviews
Profile Image for Dave Peticolas.
1,377 reviews45 followers
October 8, 2014

A summary of the UNIX design philosophy, this book is a bit out of date and needs a more abstract and less dogmatic second edition.

I was rather disapointed by 'The UNIX Philosophy' (TUP). First of all, the book feels out of date. This feeling is partly due to the fact that TUP was published in 1995 and thus many of the examples are anachronistic. However, the datedness of TUP also stems from a second flaw -- some of the tenets of the UNIX philosophy outlined in the book are too concrete and thus appear to conflict with some present-day practices which many 'UNIX people' would not, I think, consider improper. Finally, the book sometimes presents practical (and thus adaptable) design principles as unshakeable articles of faith in the UNIX Religion.

It is a measure of the speed of change in technology and the world at large that a technical book published in 1995 can seem so behind the times. For example, the chapter on the principle of software leverage and the utility of 'borrowing' the work of others doesn't mention the Free Software/Open Source phenomena, perfect examples of the power of sharing work with others to gain leverage. Of course those two movements were, respectively, relatively unknown and non-existent at the time. In the chapter on the "small is beautiful" principle, an example using the popularity of compact cars becomes a quaint reminiscence given the current (in the US at least) consumer predilection for SUVs.

Gancarz should not be blamed for failing to predict the future, but these anachronisms point to the need for a fresh edition. Furthermore, there are more serious problems in TUP.

Gancarz considers only two possibilities for implementation languages (C and shell scripts) whereas today we are presented with a host of common alternatives such as Perl, Python, and numerous others. This limitation in the variety of example languages would not be a problem if the philosophical "Tenets" presented in TUP could be applied to new languages to get the 'UNIX slant' on their utility.

However, consider Tenet 7: "Use Shell Scripts to Increase Leverage and Portability". Although Gancarz presents his Tenets as abstract principles, it is hard to imagine a more concrete engineering principle. (Use *Bourne* shell scripts? Use *this* Bourne shell script?) I think that interpreted languages like Perl have many of the same advantages that Gancarz attributes to shell scripts, but Tenet 7 seems to rule out Perl and friends as potential alternatives to C.

Then there is Tenet 5: "Store Numerical Data in Flat ASCII Files". Gancarz compares flat ASCII files with proprietary binary formats and concludes that ASCII solutions are more portable and thus more powerful. Simple enough, but what about open binary formats (such as the datastore for a freely available open-source database) or hierarchical text file formats (such as the increasingly popular XML)? An open binary format seems to circumvent at least some of Gancarz's objections, but certainly not all. XML, although stored in ASCII, is not amenable to manipulation with standard UNIX tools like 'cut' and 'paste'. Does the Unix philosophy rule out every data format except for flat ASCII? Tenet 5 seems to say that it does.

It seems to me that Tenet 5 and Tenet 7, rather than being "Tenets" at all, are really particular applications of the more general design principles of Portability (Gancarz's Tenet 4) and Software Leverage (Tenet 6). Those last two tenets are general principles that can be applied in a wide range of situations and are thus useful as engineering rules of thumb. And, I should mention, Gancarz ably argues their merits.

But the idea that portability and leverage lead inevitably to shell scripts and flat ASCII files seems suspect. Surely there are some engineering situations where, say, a Perl script would provide all the portability and leverage that a shell script could. If you have ever tried to write a truly portable shell script, you know that it's not necessarily easier than writing portable Perl!

In other words, traditional rules of thumb must be re-evaluated in the light of new situations and new experience. But Gancarz seems to place the UNIX philosophy beyond reproach. Consider the following passage (p. 103).

They [the Tenets] are the bedrock upon which the UNIX world sits. No one could strongly contest them and rightfully consider oneself a "UNIX person." To do so would invite suspicion by the UNIX community that you lack commitment to UNIX and what it stands for.

I would hope that level-headed members of the UNIX community would accept criticism with open-minded skepticism, not suspicion! Any engineering philosophy that discourages questioning the basis of itself is more like a cult than an engineering discipline. Engineering always involves tradeoffs and tradeoffs require a cost-benefit analysis. The UNIX philosophy outlined by Gancarz is the distillation of many years of cost-benefit analyses and engineering experiences of the members of the UNIX community, not a set of maxims proclaimed by the very first UNIX Zen Master that the rest of the community now follows without question.

But the UNIX community, and software engineering in general, is still relatively young and therefore still has much to learn. A book on the UNIX philosophy should emphasize the practical and adaptable nature of its teachings as a living (and thus changing) design philosophy and not as unquestionable orthodoxy.

Profile Image for Justin Cormack.
45 reviews6 followers
August 6, 2008
It may be old, but this is a key book about modularity, compositionality and why Unix works. All programmers should read it.

Profile Image for Patrick Coakley.
48 reviews10 followers
May 2, 2018
The UNIX Philosophy has some interesting insights on software design and doing things "the UNIX way" that make it at least worth checking out, but it unfortunately falls short of being a great book. In particular, I really liked the parts that focus on making small and lean programs, rapid prototyping, and choosing portability over efficiency. I also think the author had pretty good insight into where UNIX might be in the future, and his section on leveraging existing software definitely mirrors modern software development, with the idea that you are taking different modules and gluing them together. The Three Systems is something that will probably stick with me as well.

The latter half of the book dragged the whole thing down for me, as it didn't feel nearly as well-reasoned or necessary. If the author had created a more concise text without throwing in more topics to talk about towards the end, I think this book could've been a classic.
Profile Image for David.
Author 1 book123 followers
October 1, 2018
A great message in a sub-par book. I highly recommend reading it for the content, but be warned: it's a pretty awful piece of writing.

pro: the Unix tenets are presented and explained clearly

con: there are too few concrete examples to make a strong defense for each tenet

pro: Gancarz is passionate about Unix and clearly has a long history with it in various incarnations

con: Gancarz isn't always very persuasive and I found myself irritated by some of his arguments...even when I agreed with what he was saying in general

For such a short book, this had some appallingly repetitious paragraphs -- whole statements made three times in a row with very little variation. There's no excuse for that.

Nevertheless, the tenets of Unix remain as valid and relevant today as ever. At the very least, this book should give every sysadmin and developer some things to think about.
Profile Image for Rachel Johnson.
88 reviews
September 10, 2022
The outdated info/advice was probably more amusing than the author's attempts at humor but it was still an interesting read. Apparently computer interfaces in 1994 had "sex appeal" compared to earlier machines and the best notebook PCs weighed "less than 7 pounds," giving them huge potential despite not being as fast as a Cray supercomputer. The book explained the Unix philosophy too.
Profile Image for Jim.
20 reviews2 followers
November 4, 2017
Essential, along with The Mythical Man Month and The Pragmatic Programmer.
Profile Image for Vahid .
16 reviews
December 18, 2012
I'm extremely surprised that why nobody talks about this giant book on UNIX hackers community.
I do believe that this book deserves to be added into major UNIX Holy-Texts.
It teaches you the true spirit of designing software, in a UNIX style... Full of Wisdom
Profile Image for Aaron.
80 reviews25 followers
October 14, 2010
A short read, but - like The Mythical Man Month - seminal for anyone creating software. The core lessons are surprisingly relevant and applicable immediately.
Profile Image for John.
368 reviews
June 28, 2013
A re-read. Still pretty good, but after years of working on large scale multiplatform systems, it doesn't feel quite as helpful or as revolutionary as it did when it first came out.
210 reviews4 followers
December 15, 2014
A good overview of the ideas underlying the unix operating system.
Profile Image for Bart.
Author 1 book127 followers
March 9, 2018
Wish I'd have read this 20 years ago.
Displaying 1 - 11 of 11 reviews

Can't find what you're looking for?

Get help and learn more about the design.