Jump to ratings and reviews
Rate this book

The UNIX Programming Environment

Rate this book
Designed for first-time and experienced users, this book describes the UNIX® programming environment and philosophy in detail. Readers will gain an understanding not only of how to use the system, its components, and the programs, but also how these fit into the total environment.

376 pages, Paperback

First published November 11, 1983

75 people are currently reading
2392 people want to read

About the author

Brian W. Kernighan

28 books318 followers
Brian Wilson Kernighan is a computer scientist who worked at Bell Labs alongside Unix creators Ken Thompson and Dennis Ritchie and contributed greatly to Unix and its school of thought.

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
626 (47%)
4 stars
448 (34%)
3 stars
176 (13%)
2 stars
41 (3%)
1 star
18 (1%)
Displaying 1 - 30 of 41 reviews
Profile Image for Akos Hochrein.
Author 1 book5 followers
June 1, 2014
First of all, the book is incredibly old. If you are a software developer in this world, you will most likely never want to hold books related to your craft as old as this.However, UNIX is a timeless beauty. This book show exactly why.

Crunching through the first couple of sections of The UNIX Programming Environment completely refreshed my dusty knowledge on the UNIX system. Apart from receiving practical knowledge with many exercises to hone the newly attained knowledge, the book provide it's reader with deep insight on the theoretical, under-the-surface part of the UNIX system.

Sadly, the book is very old indeed, after setting us up with the filters and programming the environment, I have felt, that the coming sections will not be very interesting or up to date, and so they weren't.

My suggestion to new readers is to keep away from the last 2 sections of the book, describing the C programming environment (unless the reader is interested in how compilers were written in the old times), and the parts about documentation, since we have way better tools for those in modern environments.
Profile Image for Don Victorio.
7 reviews8 followers
November 4, 2019
The book is definitely worth reading, even THOUGH not exactly my style. I recommended it to a friend of mine and got back only positive feedback.
Profile Image for Mark Schulz.
47 reviews
May 1, 2017
Should be read by every programmer new to Linux. It introduces the underlying philosophy of Unix, something which most new programmers do not understand or practice (observations from 30+ years of teaching computer engineering). Kernighan has always been able to give clear explanations and examples of the Unix philosophy.

This is the third time I have read the book and I found it just as useful and illuminating as the first time. I started programming on a Unix system in 1979 with only the V6 documentation (some written by Kernighan) and the source code to learn from. Kernighan's books helped immensely when they came out. Once met Brian in Sydney in the 1980's - his books were more interesting. :)

If you want to become a better programmer then read this book.
4 reviews
Read
July 10, 2014
Perfectly captures the Unix philosophy of breaking down complex tasks into smaller ones held together by glue code. This book, more than any other, taught me to think the way a programmer thinks.

Despite its age (it was published in 1984) most of the examples still compile and run on a modern Unix-like system; a testament to the firm conceptual foundation of Unix.
Profile Image for Alex.
38 reviews2 followers
February 18, 2023
There is a common thread running through all of Kernighan's books: imparting deep insights in a down to earth, pragmatic and modest way.

Let's unpack that. This book is (unsurprisingly) one of the best sources on the "Unix philosophy". Brian Kernighan was there when Unix and its philosophy were taking shape. Despite being the author of a good number of the tools covered in the book, this is only mentioned in passing, in a characteristically self-effacing way (Canadians, eh?)

The aggressive simplicity, thriftiness, and pragmatism of the approch to software development applies today as much as it did the 40 odd years ago when the book was written. Yes, those were simpler times, and as we've learned more about computing in general, and Unix in particular, some problems have emerged. Like how using files as the lowest common denominator doesn't always work, or the problems with the signal model. But the authors acknowledged that Unix is not the last word in operating systems, and that it already had warts back then. But the general approach to problem solving and developing software is something we can still learn from.
Profile Image for Pawan W.
10 reviews
December 27, 2022
Completed this book at the end the reason that made me loose interest and also to read it completely, let me explain the reason -
The reason to complete it was Author is a really good programmer and the logic that has been explained by analysing problem and providing its solution in simple process is what makes this book entertaining and used to keep me on toes.
And the reason I used to loose interest in the middle is as currently I am new to programming wherever I used to get stuck or wherever the syntax and the tools which we need to try out are not working on the current machine I had a big round of googling and trying to read manuals to get the code working which took a long time and I used to leave it half way. What brought me back was I don’t keep things unfinished and it was programming logic which got built up by authors thought process which makes it a good read.
Profile Image for Unpil.
244 reviews11 followers
November 25, 2020
I read the first several chapters (1-3) and an Appendix (A) on ed to learn how to think in UNIX language, instead of keep searching for commands whenever I needed them. Although it is dated, the instruction is pedagogical, and the exercises helpful. Also, it's a nice peek into how UNIX looked like in the 1980s. The fact that so many examples still compile after almost four decades shows how strong the conceptual foundation behind UNIX is.

I might get to Chapter 5 later when I am interested in writing a longer shell script.
174 reviews4 followers
October 6, 2019
It is AMAZING that a 35 year old hands-on specific usage technology book can still be a high quality resource.

I was impressed enough by this that I have picked up "The C Programming Language" just for the heck of it.

The mehs: The final chapter has obviously not been relevant for a very, very long time. The three-ish preceding chapters focused on specific C usage were worth skimming but much less relevant to my interests than the book up to that point.
18 reviews
November 13, 2020
Kernighan is an amazing technical author, and The UNIX Programming Environment is a fun, in-depth dive through the world of Unix in the 70s and 80s. Many of the concepts, and certainly many conventions and principles, from this era still apply to Linux and MacOS, as well as numerous programming languages. However, the book is thoroughly dated, and feels a bit like a historical tour at times, albeit an enjoyable one.
Profile Image for Wonkybadonk.
81 reviews7 followers
February 7, 2021
The concept of many small programs that do one thing well and can be linked together with pipes is still relevant today in helping break the big monolithic spaghettis into more reasonable testable chunks of functionality. Chapter 8 is a bit dated for the specific code examples but the conceptual introduction to parsers and lexical analyzers is stimulating and a goof segue into the nuts and bolts of compilers. Overall a good read for the historical computing nerds out there.
Profile Image for Javier Alonso.
1 review
February 26, 2024
A great book that never gets old. Perfect for the ones wishing to start working in the *NIX environment, and for the others that already have experience in programming languages and want to expand their knowledge even more – see Chapter 8.
Written by some of the most notorious folks during that time, Kernighan and Pike
Profile Image for Kim L.
6 reviews
December 22, 2019
One word: brilliant. This book ought to be a mandatory study for all computer science students. Don't just learn different commands; learn to think like the authors. While reading this book one absorbs the paradigms and modes of problem solving from the brightest minds in the field.
3 reviews
October 21, 2020
The age of this book is actually one of its greatest assets. It teaches you the ins/outs of the unix operating system from a perspective of a novice programmer presented with an entirely new system. Definitely worth keeping on the shelf.
Profile Image for Peter Gregory.
7 reviews1 follower
April 10, 2023
Absolutely pivotal book in my IT career. Introduced to Unix in the late 1980s, I was in charge of a team of software engineers, writing commercial software in C. This book helped me understand Unix, and helped propel my career way forward in the years following.
230 reviews45 followers
October 26, 2018
This book captures the spirit of UNIX better than any book I have read. Small, simple programs that do one thing really well glued together. Amazingly powerful and beautiful.
22 reviews1 follower
January 19, 2019
This book is the Unix philosophy.

It is dated on some important parts, but every utility I noticed still exists today.

I picked up my copy for free in the library discards.
Profile Image for Ben.
2 reviews
May 3, 2021
This book contains the knowledge vital to understanding the core of modern software development and sadly, neglected by the mainstream.
Profile Image for Brok3n.
1,401 reviews105 followers
July 25, 2025
Putting it all together

I believe I read The UNIX Programming Environment, by Brian W. Kernighan and Rob Pike (henceforth K&P) shortly after it came out in 1983. I had recently graduated with a PhD in Biochemistry. The UNIX Programming Environment was one of three books that came out of Bell Labs in the seventies and eighties: Software Tools by Kernighan and Plauger in 1976, The C Programming Language by Brian W. Kernighan and Dennis M. Ritchie in 1978, and The UNIX Programming Environment by K&P in 1983. My graduate mentor, who was one of those remarkable people who knows everything but is somehow not a know-it-all, pointed me to them. (He was not a computer guy -- I think he may have had a brother who worked at Bell Labs.) I have little formal education in programming, and these remarkable books were invaluable.

The UNIX Programming Environment is the culmination of the two previous books. Software Tools described an approach to building useful software -- by building a collection of tools that worked well together to do almost anything. The tools were awkwardly written in Fortran because that was widely available. The C Programming Language presented a programming language that actually worked. The UNIX Programming Environment presented the new operating system by Bell Labs, in which these tools could be developed and comfortably used together to do useful things (develop more software, for instance).

By any measure, unix has been a huge success. It was initially owned by Bell Labs, but they licensed it to many companies and universities. The University of California at Berkeley developed its own very popular variety of unix, BSD (Berkeley Standard Distribution), on which most currently extant *nixes are more-or-less based. *nix is unix jargon for any unix variant, including GNU/linux, which is not, strictly speaking, unix. In 1991 Linus Torvalds developed a unix-like kernel (the core of the operating system), free of any privately held intellectual property, which he called linux. Together with software tools from the Free Software Foundation, this became the free GNU/linux operating system, which now runs on more CPUs by far than any other. When we consider that MacOS is a unix and that the latest versions (10 and 11) of Windows run linux under the Windows Subsystem for Linus (WSL), *nixes have become nearly universal in computing.

Despite its age of 40 years, which in computing is ancient, The UNIX Programming Environment is still a useful guide to the fundamentals of *nix.

Blog review.
Profile Image for Ovidiu Neatu.
50 reviews4 followers
February 4, 2013
Kind of obsolate, as so many people said already. I began reading the book expecting to understand more of the unix system call using the C programming language, but.. I din't find alot of that. In spite of being obsolate and my expectation going down I like very much Brian Kerninghan's way of teaching stuff. The epic chapter "Program Development" convinced me to give a 4 star to the book. The chapter is about creating a programming language so you go to all kind of stuff a computer scientist should have idea of: grammars, parsers, lexigo, lexicographic analyzer, how control flow is implemented(if, while) and more interesting stuff and how they fit togheter.
221 reviews14 followers
May 10, 2014
It's actually quite awesome to see how a book which is almost as old as I am (dated '84) can still be relevant today, certainly if you keep into account that this book is covering a topic in one of the fastest evolving disciplines today. It even has an advantage over more modern books that it's very to the point and technically going very deep. Modern books on Linux/Unix will cover X primarly and will barely touch programming, let alone describe how to use yacc and lex.

Well it's a classic, what more is there to say.
Profile Image for knoba.
138 reviews
July 16, 2016
.
.
Contents
Preface
1. UNIX for Beginners
2. The File System
3. Using the Shell
4. Filters
5. Shell Programming
6. Programming with Standard I/0
7. UNIX System Calls
8. Program Development
9. Document Preparation
Epilog
Appendix 1. Editor Summary
Appendix 2. hoc Manual
Appendix 3. hoc Listing
Index
Profile Image for David Carroll.
6 reviews
February 8, 2008
Written when UNIX was younger, the voice is one of presentation excitement & clarity. A good read for those interested in UNIX history and written by some of the gentlemen who invented it back in the late 60's.
Profile Image for Dan Allen.
83 reviews
May 25, 2012
An excellent introductory text to the world of the command line, small tools, and Unix. The C programming language, as well as Awk are described. Command shells are demonstrated. A most important work, and well written too.
Profile Image for Jeremy Dagorn.
13 reviews
October 14, 2012
Good book, with a lot of common parts/topics with the C programming Language book.
Clear, with good examples. Maybe some parts are too long to be read at one.
Really interesting part about yacc and lex.
Profile Image for Kazutaka Ogaki.
2 reviews3 followers
January 7, 2014
This is my first contact UNIX.
Although most of people have no need to know command line magics, this book is still "MUST" for apprentices of Guru.
Just a spell is not enough. To know 'WHY' is the key. This book is nearest place from the source of UNIX, so, full of anecdotes lives here.
Profile Image for idle sign.
36 reviews1 follower
April 30, 2014
Книга для желающих ознакомиться с базовыми принципами UNIX, от тех, кто стоял у истоков. Философия, архитектура, оболочка, утилиты, средства программирования. Местами слишком поверхностно, местами неоправданно глубоко.
Displaying 1 - 30 of 41 reviews

Can't find what you're looking for?

Get help and learn more about the design.