What’s the Difference Between Linux and Unix?

by Dave McKay

An adult emperor penguin and a chick.
robert mcgillivray/Shutterstock.com

Linux took its inspiration from Unix, but Linux isn’t Unix—although it’s definitely Unix-like. We will explain the major differences between these two famous operating systems.

Same Difference?

Linux is a free and open-source operating system. Unix is a commercial product, offered by a variety of vendors each with its own variant, usually dedicated to its own hardware. It’s expensive and closed source. But Linux and Unix do more or less the same thing in the same way, right? More or less, yes.

The subtleties are slightly more complicated. There are differences beyond the technical and architectural. To understand some of the influences that have shaped Unix and Linux, we need to understand their backstories.

The Origins of Unix

Unix is over 50 years old. It was developed in Digital Equipment Corporation (DEC) assembly language on a DEC PDP/7 as an unofficial project at Bell Labs, then owned by AT&T. It was shortly ported to a DEC PDP/11/20 computer, then steadily spread across other computers at Bell. A rewrite in the C programming language led to the 1973 Version 4 of Unix. This was significant because the characteristics of the C language and compiler meant it was now relatively easy to port Unix to new computer architectures.

In 1973, Ken Thompson and Dennis Ritchie presented a paper about Unix at a conference. As a result, requests for copies of Unix poured into Bell. Because selling operating systems fell outside of AT&T’s permitted scope of operations, they couldn’t treat Unix as a product. This led to Unix being distributed as source code with a license. The nominal costs were enough to cover the shipping and packaging and a “reasonable royalty.” Unix came “as is,” with no technical support and no bug fixes. But you did get the source code—and you could modify it.

Unix saw a rapid uptake in academic institutions. In 1975, Ken Thompson spent a sabbatical from Bell at the University of California, Berkeley. Along with some graduate students, he started adding to and improving their local copy of Unix. Outside interest in the Berkeley additions grew, leading to the first release of the Berkeley Software Distribution (BSD). This was a collection of programs and system modifications that could be added into an existing Unix system, but it wasn’t a standalone operating system. Subsequent versions of BSD were entire Unix systems.

There were now two major flavors of Unix, the AT&T stream and the BSD stream. All other Unix variants, such as AIX, HP-UX, and Oracle Solaris, are descendants of these. In 1984, some of the restrictions on AT&T were released, and they were able to productize and sell Unix. Unix then became commercialized.

The Genesis of Linux

Seeing the commercialization of Unix as a further erosion of the freedoms available to computer users, Richard Stallman set out to create an operating system founded on freedom. That is, the freedom to modify the source code, to redistribute modified versions of the software, and to use the software in any way the user saw fit.

The operating system was going to replicate the functionality of Unix, without including any Unix source code. He named the operating system GNU, and founded the GNU Project in 1983 to develop the operating system. In 1985, he founded the Free Software Foundation to promote, fund, and support the GNU project.

All areas of the GNU operating system were making good progress—apart from the kernel. The GNU project developers were working on a microkernel called the GNU Hurd, but progress was slow. (It is still in development today, and getting closer to a release.) Without a kernel, there would be no operating system.

In 1987, Andrew S. Tanebaum released an operating system called MINIX (mini-Unix) as a teaching aid for students studying operating system design. MINIX was a functional, Unix-like, operating system, but it had some restrictions, especially with the filesystem. After all, the source code had to be small enough to ensure it was adequately covered in a single university semester. Some functionality had to be sacrificed.

To better understand the inner workings of the Intel 80386 in his new PC, a computer science student called Linus Torvalds wrote some simple task-switching code as a learning exercise. Eventually, this code became an elementary proto-kernel that became the first Linux kernel. Torvalds was familiar with MINIX. In fact, his first kernel was developed on MINIX using Richard Stallman’s GCC compiler.

Torvalds decided to make his own operating system that overcame the limitations in the designed-for-teaching MINIX. In 1991, he made his famous announcement on the MINIX Usenet group, asking for comments and suggestions on his project.

Linux isn’t really a Unix clone. If Linux was a clone of Unix, it would be Unix. It isn’t, it is Unix-like. The word “clone” implies some small part of the original is cultivated into a new cell-for-cell replica of the original. Linux was created afresh, to have the look and feel of Unix, and to fulfill the same needs. It’s less a clone, and more a replicant.

But either way, Linux was a kernel looking for an operating system; GNU was an operating system looking for a kernel. In hindsight, what happened next seems inevitable. It also changed the world.

view original article . .

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s