Quick Links

If you use Linux or Unix, you'll want to read this interview with Brian Kernighan about the origins of Unix, from his book 'Unix: A History and a Memoir.'

Unix: A History and a Memoir

I went to university in 1990, and quickly discovered SunOS Unix in our campus computer lab. I was immediately hooked. Unix had a command line that provided a rich, powerful command line - yet it felt familiar to me, having used MS-DOS for the previous ten years. A few years later, I upgraded my MS-DOS machine at home to run a new free Unix called Linux, and never looked back.

Unix helped me get started in my IT career, too. My first job was supporting a network of Unix workstations and servers running SunOS, HP-UX, and DomainOS. The next steps in my career also involved Unix, including AIX, Solaris, and Linux.

With my history in Unix, I was thrilled to read Unix: A History and a Memoir (2019) by Brian Kernighan. You may recognize Kernighan's name; he is the author or co-author of a dozen books on computers and technology. My own bookshelf features The Unix Programming Environment (with Pike), The AWK Programming Language (with Aho and Weinberger), and The C Programming Language (with Ritchie). Other notable books include The Go Programming Language (with Donovan), The Elements of Programming Style (with Plauger), and Understanding the Digital World.

As Kernighan explains in the preface, "The book is part history and part memoir, a look at the origins of Unix and an attempt to explain what Unix is, how it came about, and why it matters."  Throughout Unix: A History and a Memoir, Kernighan shares fascinating tidbits of history about Bell Labs, Unix, and common Unix utilities you use every day.

One of my favorite stories is about how Bell Labs cleverly lobbied for a new computer so they could continue writing Unix. To summarize Kernighan's account:

Management didn't want to invest in operating system development. But AT&T is a big company and produces a lot of patent applications. "Patent applications were text documents but with some rigid format requirements, like line-numbered pages. No existing computer system could handle these oddities, so the Patent department was planning to buy" [p. 42] a dedicated system from a company that promised to deliver the required formatting in a later release.

Instead, the Bell Labs team proposed the Patent department purchase a PDP-11, and the Unix team would put Unix on it and write the necessary software to format patent applications. It was a win-win for everyone, and that's how the Unix team got their first PDP-11, and why Unix added the

        nroff
    

typesetting program.

I loved reading the stories in this book, so I reached out to Brian Kernighan to ask him about Unix: A History and a Memoir. Thanks to Brian for meeting with me.

JH: You share a lot of history about Unix and Bell Labs in the book. What's one example that readers would find really interesting?

Brian Kernighan: There's the origin story for

        grep
    

. [This story starts on page 70 in the book. Doug McIlroy asked "Wouldn't it be great if we could look for things in files?" Ken said "Let me think about it overnight" and the next morning Ken showed Doug the

        grep
    

command he'd written already but hadn't yet shared.] It was classic Ken that he had a great idea, a neat idea, a clean idea - and he was able to write it very quickly. Regular expressions were already present in the text editor, so really he just pulled out regex from the editor and turned it into a program.

I actually used this as a programming assignment in a class I taught. I told my students the Ken story, and said they had it easier for two reasons: because it was C instead of Assembly, and because they already had the end point defined. But I said they had it harder because none of them were Ken Thompson!

JH: There are a lot of great stories from that time, but a limited amount of space in the book. What stories did you not get to tell in detail?

Brian Kernighan: The Lab Scam gets only a brief story in the book, but it was a fun thing to do. [This story gets about a paragraph on page 174 in the book. Rob Pike and Dennis Ritchie (and a dozen others to help) played a prank on their boss, Arno Penzias. Short version: Penn and Teller made a visit and helped fake a demo as a good-natured prank on Penzias - then made a surprise appearance to say Hello in person.]

The prank was that Rob pretended to show Arno a video of Penn and Teller on TV, and Arno got to experiment with what Rob said was voice recognition, but really it was Penn and Teller down the hall. Remember the time, though - that's 1989, a very long time ago. Voice recognition was very difficult for computers at the time.

Arno loved it! He was very pleased to meet Penn and Teller. They were really well known at the time.

And there's another story behind that one. Getting ready for this, we had them out to visit ahead of time. And later, we went out for dinner. I remember the rehearsal and then just hanging out with Penn and Teller at a pizza parlour. I'm sure it was kind of odd for the locals at the time: "There's people from the Labs, and is that Penn and Teller? No, that can't be!" But it was great.

So that story of Rob and Dennis pulling a joke on Arno would have made a great story, but it would have been much, much too long to put that in the book.

JH: What tech from Bell Labs do you wish had made it, but didn't?

Brian Kernighan: I'd have to say the Blit, the bitmap terminal. [Blit is mentioned on page 127 in the book.] This was sometime in the mid 1980s, like 1985. The idea of overlapping windows was very innovative at the time. Rob Pike got a patent on that.

The terminal was built experimentally at 1127 [Bell Labs] using a Motorola M68000 32-bit CPU. The problem was AT&T had been trying to get into its own chip manufacturing. So the edict came down that the Blit was interesting, but it would need to run on AT&T hardware and not Motorola. So that delayed the project by about a year, and by then the market window had passed.

There's also the CRISP microprocessor. Some folks were doing a lot with microprocessors at the Labs. [CRISP gets mentioned on page 128 in the book.] This was Dave (Ditzel) and Rea's (McLellan) design, and it was a forerunner of RISC. The goal was to be a better match for the code coming out of compilers. AT&T sold this casually, and Apple tried it in the Newton. But it didn't really get traction. That's one of those things that could have been, but didn't happen.

But that's true of any organization. "Let 1000 flowers bloom and some of them won't make it." Just the luck of the draw.

Unix: A History and a Memoir is available on Amazon, in paperback and e-book formats. Published by Kindle Direct Publishing, October 2019.

Kernighan is also working on his next book, an update to Understanding the Digital World, due late 2020.