How to Understand the Unix Mindset

If you’re a new Unix user, who’s wondering why he system is designed the way it is, going back to the roots of its design might help you understand why it is the way it is.

Dennis Ritchie and Ken Thomspon with their Unix computer

Unix was a project started by Dennis Ritchie and Ken Thompson at Bell Labs for their own use on a “PDP-7 sitting in a corner.” This picture shows them in the early ’70s with a Digital PDP-11 running Unix, along with some Teletype machines, which are discussed later. established a couple of precedents. First, the PDP-7 was a little outdated, even in 1969. Unix and Linux systems still often work great on older hardware. Second, Thompson and Ritchie were experienced computer scientists. Unix, which was a play on the earlier MULTICS project they’d worked on, was designed by programmers, for programmers.

Also, the primary interface in thse days wasn’t personal computers, but with teletype machines. They were essentially typeriters with a long cable going back to a central computer. Of course, there were no graphics this way, unless you counted ASCII art. This established another tradition of a preference for text interfaces that persists today, long after graphical dipslays became common on Unix systems.

Furthermore, since teletypes were pretty slow, a preference emerged for short commands. For examples, to see a list of files in a directory, you type “ls” at the command line.

A few years later, the developers had the bright idea to rewrite Unix in C, which had been invented by Ritchie and Brian Kernighan. This was revolutionary, writing in a higher-level language. Prior to this, all operating systems were written in assembly language for raw speed. They realized that they could sacrifice a little speed for easier development, and plus, they could move Unix to other hardware platforms fairly easily. Just about every hardware platform has a C compiler available for it, which shows how good an idea that was.

Another Unix innovation was piping. If you’ve got a lot of files in a directory and want to see them by the screenful, you might type “ls [directory] | less” to view it in the less pager. The output of ls is sent to the input of less. This approach lets you build complicated tools out of little commands.

But why are there so many different flavors? The answer is that back in the ’70s, AT&T, who owned Bell Labs, could only legally sell phone service. They licensed Uix for almost next to nothing to universities, and many students who later became big players in the tech world cut their teeth on it. They were even allowed to modify the code and release their own versions, but they couldn’t call it Unix. So the answer is, in a nutshell, lawyers.

So Unix is a super-geeky text-based software Lego kit. I hope this helps you understand the system better and use it more effectively. For more Unixy fun, check out 6 Linux Distros to run from a USB drive and 5 BSD-based Operating Systems.