You’ve probably heard about Linux or at least the word Linux. You might even know it’s an operating system, in fact, it’s the kernel used at the heart of the Android operating system. It also runs on a wide range of devices including desktops, laptops and it’s at the heart of the Chrome OS. You can get it on the servers and it even runs on the Raspberry Pi and the list goes on.
You may have also heard of UNIX, they sound similar and you may be wondering are they the same thing or are they compatible or are they completely different.
In this article, you’ll learn about the interesting relationship and differences between UNIX and Linux.
So, the UNIX vs LINUX thriller begins. Read the whole article to compare and relate Linux and UNIX.
To understand the difference between these two operating systems, we need to know a bit about the history of these two systems.
Let’s start with UNIX. UNIX was invented by Ken Thompson and Dennis Ritchie. Dennis is famous for inventing the C programming language. Ken Thompson is very famous for not only inventing UNIX, but he also invented the utf-8 character encoding that we use all the time today and he is the co-inventor of Google’s Go language. So, basically UNIX was invented by two legends in computing.
In the late 1960s and early 1970s, Ritchie and Thompson along with people like Brian Kernighan were working on an operating system called Multics and that’s Multiplexed Information Computing Services, an operating system that was designed to run multiple programs at the same time.
The team got frustrated with the direction and the scope of the project, so in the spare time Thompson and Ritchie started working on an alternative. At the beginning, this alternative only could run one program at a time so rather being called Multics, it kind of got nicknamed as UNICS, Uniplexed Information and Computing Services. Over time no one could remember why that “CS” at the end got replaced by “X” and hence the UNIX operating system was born.
UNIX and C
UNIX was written in the early 1970s for the first time, and by 1972, the C programming language which Kernighan and Ritchie were developing had become sufficiently mature that they were able to rewrite the operating system in just C.
Interestingly, at that time AT&T were forbidden from entering into the computer market due to some previous legal problems they had with monopolies. Therefore, all AT&T could do was license the source code for this new operating system and that’s exactly what they did.
Then it started being used in various universities around the country. One of the important universities using it is the University of California, in Berkeley.
System-V and BSD
Over time AT&T actually separated itself from Bell Labs and now it was able to enter the computer market. By the early 80s, it started to sell a commercial version of it’s UNIX operating system and this commonly became known as System V(System 5). The reason behind V is related to different versions that came before it, so it was called System V.
At the same time, the people at Berkley were also continuing to develop the UNIX sources that they got way back from AT&T when they were licensing the sources and this led to a flavor of UNIX, called the BSD version because it’s from the Berkeley Software Distribution. So, by the mid 1980s there were two versions of UNIX running, System V from At&T and BSD from Berkeley.
From these two branches, various important and well known versions of UNIX were spawned. For example– HP-UX and Solaris came from System V and operating systems like Ultrix which was developed by DEC(Digital Equipment Corporation), came from the BSD.
System-V vs BSD
Over time the various different things that were being developed in these top branches were cross-ported. The most important one was that networking first of all came to the BSD distribution and eventually made its way over into the System V. All this source code was still under the source code license that came from AT&T when they originally sold it to the various universities. So over time the BSD version started to replace the files that came from AT&T with their own versions, and finally, it became separated from the System V version. Eventually, the University of California decided to publicly release the source for its version of the operating system and it said it was free from all AT&T files. Of course, there was a lawsuit between University of California and AT&T, and ultimately the lawsuit was dropped and what came out of that process was a version called BSD 4.4 lite which was meant to be a version of UNIX which had no source files that recently came from AT&T. Now this version of BSD then went on to create what we’ve today, which is FreeBSD and various other operating systems including in part, macOS.
Now we’ll try to understand that two important things happened till now:
First, we now have a defined UNIX philosophy. The idea of you write one program and it does one thing really well, the idea that a program and its output could become the input to another program which is the idea of pipes, the idea of how you compile programs and how the command line works, this has all been defined because of System V and BSD.
Second thing that happened is that they wanted compatibility between versions, so they started to publish and specify a range of standards, most popular one being POSIX which actually says that if your program is to compile on an operating system, it has to have particular API’s and functions. POSIX redefined what UNIX does from a programming point of view.
Entry of the GNU foundation
While all this was going on, there were several other things that were happening in the parallel that we need to know about and are really important. One is the start of the GNU foundation, GNU stands for GNU is not UNIX, which is recursive. It was started by Richard Stallman and he is responsible for the ideas of free software, not free as in no cost but free as in freedom that we’ve today. He was also responsible for making sure that there was the GNU C compiler, the GNU C runtime library and lots and lots of other tools that were used to be able to build a free version of UNIX, without relying on the BSD or AT&T files.
It is also worth mentioning that there was another operating system called MINIX which was written by Andrew S. Tanenbaum and he was using this as an educational tool to teach students the fundamentals of operating system design.
Creation of LINUX
In Finland, in the early 1990’s, there was a student at university called Linus Torvalds. He used MINIX and knew about UNIX. He wanted to overcome the deficiencies that he saw in MINIX and write his own operating system, he did that and published and announced it to the world. Here’s the announcement that he made:
This was his personal project which targeted at building something that students can have in their house and that actually made it accessible to many people who were interested in doing OS development. He started as a better alternative of MINIX, used GNU, and at the time that he actually published his announcement, the Linux kernel was completely free of all MINIX code.
When Linux was developed, it was developed using the same philosophy and the same model as the UNIX philosophy and the UNIX programming environment that came out of System V and BSD. It gained support and interest quickly and it really started to take off in 1992.
The X Window system was ported over to the Linux kernel which meant that you could now have a desktop with Windows, and you’d be able to open up multiple terminals and then lots of people started to use it.
One other key thing is that before we got to version one of Linux, it had started using the GPL(GNU Public License) that came with the free software philosophy from the GNU foundation. At that time we had an open source free software that everybody was able to contribute to, now wind fast forward to today, and we can see that Linux is absolutely everywhere.
Popularity of Linux
The popularity of Linux is undisputed. It runs at the heart of the Android operating system, that means literally there are millions of people using Linux everyday. More than 60% of web servers and around 96% of top 1 million servers on the internet are using Linux, it is used in Chrome OS, and the list goes on.
Linux is UNIX-like
Up to this point, you would probably have understood the relation and differences between UNIX and Linux.
Now let’s understand that Linux is not a version of UNIX, it’s a clone of UNIX, or today people like to call it UNIX-like because UNIX was actually a product sold by AT&T through its System V branch.
Linux doesn’t use that source code but it uses that philosophy. Obviously, Linux is used in many places and those BSD source codes kind of morphed into FreeBSD which you can download and install on a PC. Through various different kind of merges and workings, you’ll actually find parts of it even in the macOS through next step and then down into the new version of macOS, which Steve Jobs kicked off once he returned to the company. So in the end you’ll find that the most popular version of UNIX used today is actually macOS.
In the whole Linux development tree, you can still find references back to UNIX in two particular cases. One is in some files, it is mentioned that the file originally came from UNIX, however it’s now been rewritten and changed to be completely open-source. Second, there are many interfaces, ways that things work and the philosophy of UNIX that you still find in Linux. Therefore, there are various labels and things are tagged as UNIX because actually that was the way that UNIX did it and so is the way that Linux does it.
Open and Free Software Ecosystem
At the end, a Linux distribution like Ubuntu, Fedora, Red Hat, Arch or whatever your favorite Linux distribution is, includes much more than just the Linux kernel, like KDE desktop, GNOME desktop, LibreOffice, Firefox and many more tools. But at the heart of it is the Linux kernel. FreeBSD is also similar, whose kernel is based on the source code that was released by BSD 4.4 lite. All these tools are actually part of the greater ecosystem of free software.
Summary: Linux vs UNIX
In summary, UNIX is a product that was sold by the AT&T as a commercial product, its source code was licensed in the early days which means eventually we had some of the source code out in the public domain and that was used for operating systems like FreeBSD and to some extent like macOS which we have today. Linux was written using MINIX as a way of writing a UNIX clone or UNIX-like operating system and today it doesn’t share files with the original versions of UNIX from back in the 1970s & 1980s.
Ultimately free software has won today because Linux is so popular, not only on servers but also on smartphones and it’s user base is increasing on personal desktop computers.
If you liked this article, show some interest in sharing your views about UNIX vs Linux in the comments ❤ . Share some interesting key points in the comments below that I might have missed.
Do share this UNIX vs Linux thriller on social media.