Most software developers under the age of 40 wouldn’t have thought about Unix vs Linux many years ago. In recent years they will have mostly known Linux as the dominant operating system, particularly in the data center, where it might now be the OS of choice as much as 70% of the time (although this is an estimate—it’s hard to get a definitive figure) and Windows variants account for most of the other 30%. Developers who use any major public cloud can assume the target system will run Linux, and the explosion of Android and Linux-based systems in smartphones, TVs, automobiles, and other devices also point to its prevalence, so the question of Linux vs Unix appears decided.
Despite this, even those software developers who have only known the rise of Linux will have at least heard that Unix exists, even if it’s only on those occasions when they’ve heard Linux being described as a “Unix-like” operating system. Some may still wonder which is best; who would win in a Linux vs Unix contest? That’s a good question, but we really need to explore the history of these two contenders in order to answer it conclusively.
So, what’s Unix? The caricatures that swirl around the creation of this OS feature bearded men with elbow patches and sandals writing C code and shell scripts on green screens back in the 1970s. But Unix actually has a much richer history than such easy stereotypes would suggest, and we’ll attempt to lay out some of it, along with the differences between Linux and Unix, in this article.
The beginnings of Unix
A small team of programmers at AT&T Bell Labs in the late 1960s wanted to create a multi-user, multi-tasking operating system for a machine called the PDP-7, and two of the team’s most notable members were Ken Thompson and Dennis Ritchie. A lot of Unix’s concepts are recognizable from its predecessor, Multics, which was rewritten in the 1970s by the Unix team using the C language. That’s what sets Unix apart from all the rest.
Back then, it wasn’t common for operating systems to be portable. Use of low-level source language meant that the hardware platform that an operating system had been written for was the one that it was stuck with. But Unix being written in C made it possible to port it to other hardware architectures.
As well as its portable nature—which assisted Unix’s quick adoption in other research, academic, and commercial settings—some of the operating system’s core design concepts made it attractive to programmers and users. Ken Thompson’s Unix philosophy was geared towards modular software design, the idea of which was that small, purpose-built programs could be combined to tackle large and complicated tasks. Because Unix had been designed around pipes and files, this approach to “piping” the inputs and outputs of programs together into a direct set of operations on the input is still popular today. In fact, the present cloud functions-as-a-service (FaaS)/serverless paradigm has its origins in the Unix way of thinking.
Quick growth and competition
Unix grew in popularity through the 1970s and 1980s, expanding into research, academia, and commercial business, but Unix wasn’t open source software though. This meant that anyone wanting to use it needed to buy a licence from AT&T, which owned it. The University of Illinois bought the first known software licence in 1975
Thanks to Ken Thompson’s sabbatical at Berkeley University in the 1970s, a lot of Unix activity got underway there, resulting in the creation of Berkeley Software Distribution, or BSD. At first, BSD wasn’t offering a competitor to AT&T’s Unix, just an add-on with some extra software and capabilities. When 2BSD (the Second Berkeley Software Distribution) came along in 1979, Bill Joy, a Berkeley graduate student had made more programs available like vi and the C shell (/bin/csh).
Along with BSD, which enjoyed enduring popularity as a member of the Unix family, commercial Unix offerings became prevalent throughout the 1980s and early 1990s thanks to names such as HP-UX, IBM’s AIX, Sun’s Solaris, Sequent, and Xenix. As different branches of the Unix family tree took shape, the “Unix wars” ensued, and the community was now focused on standardization. The results came in 1988 with the POSIX standard, and The Open Group added more follow-on standards in the 1990s.
This period saw Sun and AT&T release System V Release 4 (SVR4), which many commercial vendors were quick to pick up. The BSD group of operating systems had been busy growing too, resulting in various open source versions that came out under the BSD license, including FreeBSD, OpenBSD, and NetBSD. Many of these variants of Unix still get used today, although a lot have experienced a decline in their share of the server market, with many managing no better than single digits popularity. BSD might currently have more installations than any modern Unix system. Also, BSD can be found in every Apple Mac hardware unit sold recently, as the OS X (now macOS) operating system it uses is derived from BSD.
We could say a lot more about Unix’s history but that’s beyond the scope (and the length) of this piece. We are more interested in talking about Unix vs Linux, so let’s look at how Linux got started.
The Linux operating system is the descendent of two projects that began in the 1990s. Richard Stallman wanted to build a free and open source alternative to Unix. He called the program GNU, a recursive acronym that meant “GNU’s not Unix!” A kernel project got going, but progress was difficult, and with no kernel, any hopes of a free and open source operating system would be in vain. But then came Linus Torvald with a feasible kernel named Linux that completed project. Linus used a number of GNU tools (like the GNU Compiler Collection, or GCC) and they proved to be a perfect match for the Linux kernel.
Linux distributions appeared thanks to GNU components, the Linux kernel, MIT’s X-Windows GUI, and other BSD components that were permitted under the open source BSD license. Slackware and then Red Hat distributions were popular because they enabled the typical 1990s PC user to use the Linux operating system. For many this complemented the proprietary Unix systems they used in their working or academic lives, so out of Linux and Unix, Linux offered clear appeal.
Because of the free and open source nature of Linux components, anyone was allowed to create a Linux distribution, and soon there were hundreds of distros. Distrowatch.com currently lists 312 unique Linux distributions. Naturally, numerous developers make use of Linux either via popular free distributions like Fedora, Canonical’s Ubuntu, Debian, Arch Linux, Gentoo, and many other variants, or through cloud providers. Commercial Linux offerings, which offer support in addition to the free and open source components, achieved viability when numerous enterprises—and IBM was among them—moved from Unix and its proprietary model to supplying middleware and software solutions for Linux. Red Hat Enterprise Linux was built on the basis of a proprietary model of commercial support. German provider SUSE followed suit with SUSE Linux Enterprise Server (SLES).
Unix vs Linux
Up to now, we’ve had a brief overview of the history of Linux and Unix and the GNU/Free Software Foundation underpinnings of a free and open source alternative to Unix. Let’s take a look at what’s different about Linux vs Unix, two operating systems that share similar histories and aspirations.
There aren’t many obvious differences between Linux and Unix from the user’s point of view. A lot of Linux’s appeal came from the fact that it worked on different architecture types (the modern PC included) and it’s tools were familiar to Unix users and system administrators.
Compliance with POSIX standards made it possible to compile software written on Unix for a Linux operating system without too much difficulty. In a lot of cases, shell scripts could be used directly on Linux. Some tools in Unix and Linux may have had slight differences in flag/command-line options, but many worked in the same way on either system.
It’s worth noting here that macOS hardware and operating system became popular as a Linux development platform because a lot of Linux tools and scripts also work in the macOS terminal. Linux tools like Homebrew make a lot of open source software components available.
The other differences between Linux and Unix mostly relate to licensing. Linux vs Unix is largely a contest of free v licensed software. Alongside this, the fact that Unix distributions lack a common kernel affects software and hardware vendors, too. With Linux, a vendor can create a device driver for a particular hardware device with the reasonable expectation that it will work fine across the majority of distributions. But with Unix having commercial and academic branches to cater to, it might be necessary to release different drivers for all the Unix variants. There was also the problem of licensing, and other worries related to access to an SDK or a distribution model for the software as a binary device driver across multiple versions of Unix. Linux and Unix are clearly different.
Many of the advances seen in Linux have been mirrored by Unix, which shows that Linux and Unix developers keep a close eye on each other. A lot of GNU utilities became available as add-ons for Unix systems on occasions when developers wanted features from GNU programs that were not part of Unix. For instance, IBM’s AIX had AIX Toolbox for Linux Applications which contained hundreds of GNU software packages (like Bash, GCC, OpenLDAP, among numerous others) that could be added to an AIX installation to make transitioning between Linux and Unix-based AIX systems go more smoothly.
Proprietary Unix still exists, and there are many major vendors who promise to support their current releases for several more years yet, so Unix won’t be disappearing from sight any time soon. Also, the BSD branch of Unix is open source, and NetBSD, OpenBSD, and FreeBSD all boast strong user bases and open source communities. They might not be as vocal as their Linux equivalents, but their numbers continue to outstrip those of proprietary Unix numbers in areas like the web server arena.
Linux has become ubiquitous across a multitude of hardware platforms and devices. Linux drives the Raspberry Pi, which has become hugely popular among enthusiasts. It’s a platform that has ushered in a whole array of IoT devices running Linux. We’ve already mentioned Linux’s prevalence in Android devices, cars, and smart TVs. Every cloud service features virtual servers running Linux, and a lot of the most popular cloud-native stacks are based on Linux, whether that means container runtimes or Kubernetes or the sundry serverless platforms that are coming to the fore.
Finally, it’s interesting to note that Microsoft’s creation of the Windows Subsystem for Linux (WSL), along with the Windows port of Docker, including LCOW (Linux containers on Windows) support, would have been unthinkable back in 2016. They point clearly to the fact that Linux vs Unix is a contest that’s been pretty much decided.
No comment yet, add your voice below!