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.
RELATED: The Great Debate: Is it Linux or GNU/Linux?
Who Does the Development?
A Linux distribution is the sum of many different parts, pulled from many different places. The Linux kernel, the GNU suite of core utilities, and the user-land applications are combined to make a viable distribution. And someone has to do that combining, maintaining, and managing—just like someone has to develop the kernel, the applications, and the core utilities. The distribution maintainers, and the communities of each distribution, all play their part in bringing a Linux distribution to life just as much as the kernel developers do.
Linux is the result of a distributed collaborative effort performed by unpaid volunteers, by organizations like Canonical and Red Hat, and industry-sponsored individuals.
Each commercial Unix is developed as a single coherent entity using in-house—or tightly controlled outsourced—development facilities. Often, these have a unique kernel and are designed specifically for the hardware platforms supplied by each vendor.
The free and open-source derivatives of the BSD Unix stream, such as FreeBSD, OpenBSD, and DragonBSD, use a combination of legacy BSD code and new code. They are now community-supported projects and managed much like Linux distributions.
Standards and Compliance
In general, Linux is neither Single Unix Specification (SUS) compliant nor POSIX compliant. It tries to satisfy both standards without being a slave to them. There have been one or two—literally, one or two—exceptions, such as Inspur K-UX, a Chinese Linux that is POSIX compliant.
A true Unix, like the commercial offerings, is compliant. Some BSD derivatives, including all but one version of macOS, are POSIX compliant. The variant names, such as AIX, HP-UX, and Solaris, are all trademarks held by their respective organizations.
Trademarks and Copyright
Linux is a registered trademark of Linus Torvalds. The Linux Foundation manages the trademark on his behalf. The Linux kernel and core utilities are released under various GNU “copyleft” General Public Licenses. The source code is freely available.
Unix is a registered trademark of the Open Group. It is copyrighted, proprietary, and closed-source.
FreeBSD is copyrighted by the FreeBSD Project, and the source code is available.
Differences In Use
From a user-experience perspective, at the command line, there is not a lot of visible difference. Because of POSIX standards and compliance, software written on Unix can be compiled for a Linux operating system with a limited amount of porting effort. Shell scripts, for example, can be used directly on Linux in many cases with little or no modification.
Some of the command-line utilities have slightly different command-line options, but essentially the same arsenal of tools is available on either platform. In fact, IBM’s AIX has an AIX Toolbox for Linux Applications. This allows the system administrator to install hundreds of GNU packages (like Bash, GCC, and so on).
The different Unix flavors have different graphical user interfaces (GUI) available to them, as does Linux. A Linux user familiar with GNOME or Mate will have to feel their way the first time they encounter KDE or Xfce, but they’ll soon pick it up. It’s similar with the range of GUIs available on Unix, such as Motif, Common Desktop Environment, and the X Windows System. They’re all similar enough to be navigable by anyone who’s familiar with the concepts of a windowed environment with dialogs, menus, and icons.
You’ll learn more about the differences while administrating the systems. For example, there are different init mechanisms. Derivatives of the System V Unix and the BSD streams have different init systems. The free BSD variants maintained the BSD init schemes. By default, Linux distributions will either use an init system derived from Unix System V or systemd.
RELATED: Why Linux’s systemd Is Still Divisive After All These Years
Stick Shift vs. Automatic
If you can drive one, you can drive the other—even if it’s going to be a bit stop-start to begin with.
Putting price aside, the differences in philosophy, licensing, development model, community organization, and the type and style of governance are larger and more significant than the differences in command line flags between, say, one version of grep and other.
The biggest differences are not the ones you see on the screen.