Linux, Web Hosting, and Everything Else in Between
Linux, Web Hosting, and Everything Else in Between

UNIX vs Linux: Everything You Need To Know

unix vs linux

I get this question quite often, but I struggle explaining it, especially in a few simple words. Anyway, this is a very interesting topic becauseĀ things are very complicated when it comes to UNIX vs Linux. There are business related things, licenses, policies, government influence etc.

Due to Unix being an operating system and Linux being a kernel, they are different in nature and they have different purposes, they aren’t easily comparable. You can’t summarize the differences and what they are in a single sentence. But don’t worry. After this lesson of history and both of their features and purposes, you will get the “big picture” and everything will be nice and clear. You can jump to the end of the post, in the conclusion, if you want a quick read through.

Jump to:




Multix

multics logo

Let’s jump to the late 1960s.Ā Personal computers at the timeĀ were designedĀ to do single specific tasks.Ā For example, there was a computer for calculating a monthly salary, or a computer to do word processing in a library etc. Each of them was running a programĀ specificallyĀ designed for that particular hardware and the task it was meant to do. The programs thatĀ were writtenĀ for one computer vendor (or manufacturer like IBM or Apple) cannotĀ be executedĀ on a computer developed by a different vendor. Those computers cannot handle the execution ofĀ multipleĀ programs at a time, but only one. So if a user wanted to listen to some music while writing a document, that was impossible.

To overcome those issues the Multics (also known as Multix) operating systemĀ was developed.Ā InitiallyĀ as a collaborative project between MIT, General Electrics and Bell Labs.Ā This is the root, the OS that laid the fundamentals of every new one including Windows, MacOS, Android, Linux-based operating systems and many more.

Multics (Multiplexed Information and Computing Service) is a time-sharing operating system.Ā This means that many programs can share the hardware resources and switch on finite time intervals.Ā In other words, the idea behind time-sharing operating systems is the mechanism that works as follows:

  • One program is using the hardware (CPU, RAM memory etc.) for some time, let say 20ns (nanoseconds), then itĀ is stopped.
  • Now the hardware resources are available for another program for an equal amount of time, 20ns.

Due to the very small intervals (very fast switching) there is an illusion thatĀ multipleĀ programs are runningĀ concurrently.Ā The very same principle is present in every modern operating system.

In addition to time-sharing capabilities, MulticsĀ was designedĀ with the idea of a modular hardware structure and software architecture. It is consistent with many small ā€œbuilding blocksā€.Ā Each block can beĀ independentlyĀ swapped with another one that does the same function butĀ maybeĀ in a different way.Ā The final result is building a system that can grow by time and reusing the blocks instead of reimplementing them.Ā So when there is a hardware change, only a few blocks are being updated, the rest are being reused. If the very same featureĀ is required byĀ multipleĀ programs they can share a common implementation.Ā For example, many programs can share the same implementation for transforming a word to lowercase thus saving time, effort, frustration among developers, and money.Ā Those are the fundamentals of Multics.

Besides all the goodness of Multics, Dennis Ritchie and Ken Thompson (at the time employed in Bell Labs) were not satisfied with all aspects of the project.Ā MostlyĀ by the size and the complexity introduced to achieve the goals.Ā In their spare time they started working on a similar hobby project (actually reimplementation of Multics) named Unics (Uniplexed Information and Computing Service) also known as Unix.Ā As you can see the name UnicsĀ is influenced byĀ Multics with the only difference being swapping the word “multiplexed” with “uniplexed”.Ā The reason for this swap is the technical disadvantages of the Unics project at the very beginning.Ā It could not handle the execution ofĀ multipleĀ programsĀ simultaneously, only one single program at a time, so uniplexedĀ was used.Ā It is worth mentioning that the Unics projectĀ was intendedĀ only for internal use inside Bell Labs and it was developedĀ without any organizational backing.

Since we reached the birth of Unics, it’s time for a small recap:

  1. Multics development started in the late 1960s
  2. Multics goals are still valuable as of today. It’s time-sharing (multi-tasking)
  3. Complaints about the size and complexity
  4. In the early 1970s, Unics development begins but on a smaller scale to overcome the disadvantages of Multics. It is a hobby project of Dennis Ritchie and Ken Thompson.

Letā€™s continue with more details about Unics and its development.

Unix

Unics wasĀ initiallyĀ written in assembly language.Ā Because of this, most of the code was hardcoded for specific hardware and notĀ easilyĀ portable to other computers. No better alternative was available at the time.

Meanwhile, the C programming languageĀ is releasedĀ (also by Dennis Ritchie and Ken Thompson).Ā The intention of this programming language is toĀ be usedĀ for writing portable programs.Ā ItĀ is achieved byĀ requiring a relativelyĀ simple compiler,Ā efficientlyĀ mapping to machine instructions, requiring minimal run-time support etc. For non-technical people, this is truly amazing.

At this moment in time, there is Unics, but it’s not portable, and there’s a new programming language that offers portability.Ā Sounds like a wise idea – Unics to be rewritten in C. In the mid-1970s, Unics is being rewritten in C, introducing portability, but there was a legal issue preventing public release and wide use.

From a business and legal perspective things are quite interesting.Ā There is a giant telecommunication company named AT&T that owns theĀ previouslyĀ mentioned Bell Labs research center.Ā Due to the nature of the business and how available the technology was at that time, AT&TĀ was consideredĀ as a government controlled monopoly.Ā To simplify things, prices of the telecommunication servicesĀ are controlled byĀ the government so they can not skyrocket high, but also AT&T cannot go to bankruptcy due to the guaranteed income stated by the government. The point is thatĀ Bell Labs have a stable source of income (founded by AT&T) and can afford to allocate resources to whatever task they want with little to no worry about the cost. Almost complete freedom which is quite good for a research center.

Because of the monopoly issues and other legal stuff, AT&TĀ was forbiddenĀ to enter into the computer market, only telecommunication services were allowed. All they could do was to license the source code of the Unics.Ā It is worth mentioning that the source code is being distributed through other research centers and universities for further research, development, and collaboration, but under the corresponding license terms.

Later, there is a separation between Bell Labs and AT&T. Since the government controlled monopoly is on AT&T, Bell Labs is free after the separation so no legal issues are present anymore.

System V and BSD

By the 1980s, AT&T released a commercial version of Unics named System 5 (known as System V).

In meantime, while AT&T was working on System 5, atĀ BerkeleyĀ University of California, the development ofĀ previouslyĀ shared code from Bell Labs continues and very similar Unics operating system is being developed and released as BSD (Berkeley Software Distribution).

It’s time for a recap:

  • Initial development of Unics is being done at Bell Labs
  • Unics source code is shared among universities and other researches
  • Separation of Bell Labs and AT&T
  • AT&T continues with the development of their own version of Unics named System 5
  • At Berkeley University of California, development of the previously shared source code is continued and another operating system is released as BSD (Berkeley Software Distribution).

So by the mid-80s, we already have two different Unics distros (System 5 and BSD) evolved by their own, but sharing a common predecessor.

There is no such thing as ā€œthe realā€ or ā€œthe genuineā€ Unics operating system. Šs time passes there are even more variants of what was available at those two branches.

  • HP branches out developing an operating system named HP-UX (Hawelt Packard Unix).
  • Sun branches out with an operating system named Solaris.
  • IBM branches out and continues developing their version named AIX.

It is worth mentioning thatĀ all of these branch outs are being done to provide some unique features in order for a given vendor to offer a better product on the market.Ā For example, the networking stack isĀ firstlyĀ available on the BSD branch, but later cross-ported to all other branches. Almost every nice feature was cross ported at some time to all other branches.Ā To overcome the issues while cross porting features, and to optimize reusability at a higher level, the POSIX (Portable Operating System Interface X) is being introduced by theĀ IEEE Computer SocietyĀ in 1988.Ā This is a standard that if followed by the vendors, compatibility betweenĀ operating systemsĀ willĀ be guaranteed, thus programs will be executable on other operating systems with no modificationsĀ being required.

Although reusability is present to some degree, the addition of new features requires a lot of work, thus makes development slower and harder.Ā This is due to the inheritance of the terms and conditions of the AT&T license under which the Unics source codeĀ was distributed.Ā ToĀ eliminateĀ all the legal issues about sharing the source code, people working on the BSD branch started replacing the original source file inherited from AT&T with their own implementation, but releasing it with the BSD license that is more liberalĀ in terms ofĀ reusability, modifications, distribution etc. The idea is to release the Unics operating system without any restrictions. Today, thisĀ is knownĀ as free software.Ā Free as in freedom to study,Ā modifyĀ and distribute the modified version without any legal actions against the developer.

This idea was not welcomed by AT&T, so there was a lawsuit. It turns out that there is no violation of any kind.Ā The trend of replacing files continues and BSD version 4.4 (also known as BSD Lite)Ā was releasedĀ free from any source code originating from AT&T.

One more recap:

  • Many branch outs
  • POSIX standard
  • It turns out that many features are being cross ported sooner or later
  • Hard to say what is the ā€œrootā€ or ā€œgenuineā€ Unics operating system anymore. Everything is being branched from the same predecessor and every feature cross ported thus everything is more or less a variation of the same OS.
  • Due to legal issues that come from the contents of the AT&T license, development was hard and redundancy was common.
  • BSD started removing all the files originating from AT&T and providing source files that are free for modification and redistribution.

Now it is time to mention the GNU project.

GNU

gnu

GNU (GNU’s Not Unix), a free software, mass collaboration project announced in 1983. Its aim is to provide users freedom and control in their use of their computers and electronic devices.

Can you spot the similar idea with what people behind BSD are doing already?

Both are somehow related to the term free software. but with a very big difference in how free software shouldĀ be treatedĀ and that is obvious by comparing the GPL license (released by GNU) and BSD license.Ā Basically,Ā it comes down to:

  • The BSD License is less restrictive. It says do whatever you want with the source code. No restrictions of any kind.
  • The GPL License is more restrictive but in a good way. It puts emphasis on preventing the use of open source code (GPL licensed) in proprietary closed source applications. It states that if any GPL licensed source code is being used, the source of your code must be released under the same license too. Basically, with the GPL license, you can take whatever you want, but you must give back whatever you produce, thus raising the amount of available free software.
  • As a comparison, the BSD license does not state that whatever is being produced must be released as free software too. It can be released as proprietary closed source software without sharing any of the source code.

In additionĀ to the license, the GNU project is developing a lot of software thatĀ is requiredĀ in order toĀ have aĀ fullyĀ functional operating system.Ā Some of their tools are GNU C library, GNU Compiler Collection (GCC), GNOME desktop environment etc. All of which are currently used in popular Linux distros.

Having all this in mind letā€™s talk about Linux byĀ brieflyĀ explaining what it is.

Linux

tux linux
Tux, the Linux mascot

Linux is not an operating system like BSD. Linux is a Kernel.

But what is the difference between a Kernel and an Operating System?

  • An operating system is a collection of many things working as a whole, fully functional, complete product.
  • A kernel is only a piece of the whole operating system.
  • In terms of the Linux kernel, it can be said that it is nothing more than a bunch of drivers. Even though there is a bit more, for this purpose, we will ignore the rest.

Now, what are drivers? A Driver is a program that can handle the utilization of a specific piece of hardware.

Let’s explain by examining a very common use case, connecting your smartphone to a Wi-Fi network.

To be more precise, engineers will define this use case as: wireless communication of two devices, a smartphone, and a Wi-Fi router.

For any kind of wireless transmission, there must be antennas. By this logic, we know that there are at least two of them, one on a smartphone (very tiny build in the phone under the case), and one on a Wi-Fi router (this one is big and visible).

Antennas work by emitting or receiving radio waves. Each radio wave carries some information. The question that comes naturally is who is controlling what the antenna is emitting? It is the driver. A piece of software that handles the utilization of a piece of hardware.

On top of this, there are many many more antennas in the area like television (terrestrial) antennas, neighbor’s Wi-Fi routers, laptops, walkie-talkies, taxi driver’s radio stations etc. So there are many signal collisions all interfering with each other. A driverā€™s obligation is to handle all that by filtering the signal received by the antenna. Also allowing multiple programs to share the same hardware like Skype and Viber to transmit simultaneously through the same antenna without merging the messages etc.

Short recap:

  • A Driver is a program that handles the utilization of a specific piece of hardware.
  • Linux is just a bunch of drivers (and something more that will be ignored for now)
  • Linux is a kernel.
  • A Kernel is a piece of an Operating System.

I assume we are all clear by now so we can begin with the Linux history lesson.

Its origins are in Finland in the 1990s, about 20 years later than Unics.Ā Linus Torvalds at that time was a student and was influenced by the GNU license and Minix (Unics based operating system for education). He liked many things about Unics operating systems, but also disliked some of them.Ā As a result, he started working on his own operating system utilizing many of the GNU tools already available. The end result is that Linus developed only a Kernel (the drivers).Ā Sometimes the Linux-based operating systemsĀ are referred toĀ as GNU-Linux operating systems because, without GNU tools, the Linux Kernel is useless in real life.

It can be said that Linux, to some point, is just a reimplementation of what was available as the Unics operating system (BSD, System 5…) but with a license that puts more emphasis on keeping the software free by enforcing modifications toĀ be contributedĀ back, thus available for studying, modifications, and further distribution.

The time-sharing capabilities that allow multitasking, the C programing language for providing portability, modular software design that allows swapping a single peace when needed and reusing the rest, and other stuff areĀ inherited from Unics. Those are the fundamentals mentioned at the very beginning of this post. But not sharing any source code with Unix.

It is worth mentioning that LinuxĀ was intendedĀ to be a small school project. Many computer scientistsĀ were interestedĀ in trying it out of curiosity.

While Linux was still young, the lawsuit between BSD and AT&T was ongoing. Due to the uncertainty in BSD’s features, many companies that utilized BSD moved to Linux as a very similar alternative with more stable features. Linux was also one single source of code while the BSD source was distributed on many independent branches (BSD, Solaris, HP-UX, AIX etc.)

From the perspective of a company, requiring an operating system for their product (Wi-Fi routers, cable TV boxes etc.)Ā Linux was a better choice. Having a single branch guarantees that all the features merged in the one feature will be available right away. Having a single branch is simpler for maintenance too. On the BSD side, due to the independent development, those new features still required some sort of cross porting which sometimes breaks something else.

This is the historical reason of why Linux gained great popularity even in the early stages of its development, while still not being on pair with BSD and lacking many features.

Unics vs Unix, Multics vs Multix

Did you notice that sometimes the term UnicsĀ is usedĀ instead of Unix?

The fun fact is that the original name of the project is Unics, but somehow people started calling it Unix. There are many stories about why Unix becomes a popular name, but no one can tell for sure. Now the name UnixĀ is acceptedĀ as the official name of the project.

The very same is happening with Multics, with time everyone was calling it Multix even though it was not its official name.

Conclusion – Unix vs Linux

unix timeline
A timeline of Unix-like OSes

At this moment we know the history and the evolution of the operating systems, we do know why all these branch outs occurred, we do know how government policy can influence things. The whole story can be summarised as:

  • Unix was an operating system back in the 1960s and 1970s while being developed in Bell Labs. With all that branching mentioned above, and the cross porting features between branches, it is simply a chaotic situation and hard to say what is the genuine Unix anymore.
  • It can be said that the most genuine Unix operating systems are System 5 and BSD.
  • System 5 is developed by AT&T as a continuation of the work done at Bell Labs after their separation.
  • The most popular direct ancestor of Unix is the BSD project. It took all the source code from what was developed in Bell Labs, then replaced any source code released under a restrictive license and continued it as free distribution.
  • Other popular distributions of today are Free BSD, Open BSD, Net BSD, but many more are available.
  • Linux, on the other hand, does not share any code with Unix (from Bell Labs), it just follows the same principle of utilizing small building blocks to produce something of bigger value. This is mostly known as writing a small program that does one thing and does it well. Later, those programs are combined with mechanisms known as “pipes” and “redirection”, so the output of one program becomes the input to another program and as the data flows, something of bigger values is achieved as a final result.
  • In terms of Licenses, Unics has a very restrictive license policy when developed. Later, it’s forked under free licenses (BSD). Linux, on the other hand, is using the GPL license from the very beginning.
  • Both are following the POSIX standard so program compatibility is guaranteed.
  • Both are using the same shell for interfacing with the kernel. It is Bash by default.
  • BSD is distributed as a whole system.
  • Linux-based operating systems are made with the Linux Kernel in combination with GNU software and many other smaller utilities that fulfill each other to accomplish the goal.
  • Popular Linux Distributions: Ubuntu, Mint, CentOS, Debian, Fedora, Red Hat, Arch Linux, and many more. There are hundreds of distros nowadays, some of them even optimized for a specific purpose, like gaming or for old computers.

Even though we stated that there is one single source – the Linux Kernel, there are many Linux Distributions (Linux based operating systems). This may be confusing for someone so I will explain this just in case:

Every Linux distribution (distro) ships different versions of the Linux Kernel or the tools, orĀ simplyĀ utilizing different building blocks.Ā For example, Ubuntu is using SystemD as an init system, but Slackware is using SysV as the equivalent. There is nothing wrong with both, they do the same thing with some differences and there is a use case when one is better than the other,

Another example is that there are users who prefer to always have the latest version of the software, they use rolling release Linux based operating systems like Arch Linux. Other may prefer a stable environment with no major changes in 5 or more years, Ubuntu LTS (Long Term Support) version is ideal for this use case, which is why is widely used in servers along with CentOS.

As you can see there are even more similarities of both. Linux based operating systems are in the same “chaotic” situation too. There is no such thing as the real or the genuine Linux based operating system. There are many of them, but at least they do share the same source of the Linux Kernel,

It is worth mentioning that programs written for Linux based operating systems or bash commands that are following the POSIX standards can be executed on any Unix based operating systems too. Thus all major software like Firefox, or the GNOME desktop environment is available everywhere without requiring any modifications.

Another fun fact not mentioned before is that even the Mac OS (used in Apple computers) is considered as a BSD derivative. Not every release, but some of them are.

As you can see, in reality, things are even more complicated and interesting.


About the Author

This article was submitted to us by a third-party writer. The views and opinions expressed in this article are those of the author and do not reflect the views and opinions of ThisHosting.Rocks. If you want to write for ThisHosting.Rocks, go here.

Leave a comment

Your email address will not be published. Required fields are marked *

5 thoughts on “UNIX vs Linux: Everything You Need To Know”