Week 1. Topic "Unix vs Linux"

This video covers the entire topic of the first week. Please bear in mind that the talk covers a half a century of computer history in 14 minutes. So, please be warned that it goes at a very fast pace. To make it easier to follow we have broken the talk in to sub-topics provided you with full transcript. Our advice is to read each sub-topic first and then watch only that part in the video.

For the enthusiastic student we have provided further references at the end. But those reference material are not compulsory.

At the end of watching the video, you are required to take the on-line Test 1.d on "Unix and Linux".


Gary explains: Unix vs Linux (13:59 min)

Introduction (0:00-0:39)

Hello there! My name is Gary Sims and this is Gary explains.

Now you've probably heard of the word Linux. You know it's an operating system. In fact it's the kernel that's used at the heart of the Android operating system. It also runs on a wide range of devices including desktops, laptops. It's at the heart of Chrome OS. You can get it on servers. It even runs on the Raspberry Pi.

Now you may have also heard of Unix. Of course they sound similar - Linux, Linux and UNIX - and you may be wondering are they the same thing are they compatible are they completely different? So if you want to know what is the difference between UNIX and Linux, please let me explain.

The origins: MULTICS, UNIX and C (0:40-2:25)

OK, to understand the difference between these two operating systems we need to know a bit about the history of how we got to where we are today. So let's start with UNIX. So UNIX was invented by two men, that is, Ken Thomson [1] and Dennis Ritchie [2]. You may have heard those two names before. Dennis Ritchie of course for inventing the C programming language and If you have a copy of The C Programming Language [3], the book by Brian Kernighan [4] and Dennis Ritchie, Kernighan and Ritchie, it's often called the KR version of the C language. Then there is Ken Thompson and he 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 here we're dealing with kind of legends in computing.

Ken Thompson Dennis Ritchie Brian Kernighan

So in the 19 late 1960s, early 1970s Ritchie and Thompson along with people like Kernighan were working on an operating system called MULTICS [5]. And that's the Multiplexed Information Computer Services that was an operating system that was designed to run multiple programs at the same time. Now the team got frustrated with the direction and the scope of the project and so in their spare time Thompson and Ritchie started working on an alternative. Now 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 where the U part was for Uniplexed.

And you can see what happened from here that was spelling was with a CS at the end but over time no one can remember why not even Kernighan not Ritchie, Thompson over time that got changed to Unix with an X at the end and hence the UNIX operating system was born. Now it was written first of all in the early 1970s and by 1972 the C programming language, which Kernighan Richie were developing, had become sufficiently mature that they were able to rewrite the operating  system in just C.

Various versions of UNIX (2:25-6:07)

Now two things: At the time AT&T were forbidden from entering into the computer market due to some previous legal problems they had with monopolies. So therefore all AT&T could do was license the source code for this new operating system. And that's exactly what they did. And it started being used in various universities around the country. One of the universities, where the new operating system arrived, was at the University of California in Berkeley.  Now overtime AT&T actually separated itself from Bell Labs and it was able now to enter in to the computer market. So by the early 80s it had actually started to sell a commercial version of its UNIX operating system. And this commonly became to known as System V and there's a whole reason for that to do with different versions that came before it. But it was called system V. The UNIX sources that they got way back when AT&T were licensing the sources and this led to a flavor of UNIX called the BSD version because it was from the Berkely Software Distribution.

By the mid 80s you've now got two versions of UNIX running: You've got System V from AT&T itself and you got BSD from California. From these two branches there came two various important and well-known versions of UNIX were spawned. For example HP-UX and Solaris come from the System V - kind of inheritance and operating systems like Ultrix which was from DEC Digital Equipment Corporation the BSD line. Now of course over time the various different things that were being developed in these top racism were cross ported the most important one was that networking first of all came to the BSD distribution and eventually that made its way over into System V [6].

Of course all this source code is still under the source code license that came from AT&T when they originally sold it to the various universities. So over time the that came from AT&T with their own version, so it became separated from the System V version. Eventually in the University of California side to release publicly the source code for its version of the operate is 'm and it said it was free from all AT&T files. Of course there was a lawsuit and we're now in the early you've got the University of California vs. AT&T and ultimately the lawsuit was dropped. And what came out of that protest was a version called BSD 4.4 light, which is meant to be a version of UNIX which has no source files that recently came from AT&T. Now this version of BSD then went on to create what we have today which is FreeBSD and various other operating systems including in part Mac OS which we'll talk about in a moment.

Now the upshot of all this is that two important things happened: One is that we now have a defined UNIX philosophy so the idea of you write one program and it does one thing really well the idea that a program, it's 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 5 and because of BSD [7].

And the other thing that happened is that they wanted compatibility between the versions so there started to be published a range of standards the most popular one being POSIX which actually says that if your program is to compile on this operating system it has to have these API's that have these particular functions. So you've got the POSIX specification which redefined what UNIX does from a programming point of view. [8]

The birth of GNU (GNU is Not Unix) and MINIX (6:07-7:12)

Now while all this was going on there are several other things that were happening in parallel that we need to know about. One is the start of the GNU foundation - GNU standing for GNU is Not Unix which of course is recursive because then to go back into  you see GNU is Not GNU is Not Unix and that was started by Richard Stallman and he is responsible for the ideas of Free Software - not free is in no cost but free is in freedom - that we have today and also he was responsible for making sure there was the new GNU C compiler, the new see runtime library and lots of lots of other tools that were used to able to be able to build a free version of UNIX without relying on the BSD files  or relying on the AT&T files.

And also it's worth mentioning there was another operating system called MINIX which was written by Andrew Tannenbaum and he was using this as an educational tool to teach students the fundamentals of operating system design. So you've got System 5, BSD which has been released publicly, you've got MINIX and you've got the GNU tools.

The arrival of Linux (7:12-9:08)

In Finland in the early 1990s there was a student at a university called Linus Torvalds. He knew about UNIX and he wanted to overcome the the deficiencies that he saw in UNIX and write his own operating system. And he did that and published it, announced it to the world. Now there's a key couple of things about this announcement. First of all it ran on PCs, that's 386 PCs. So we're not dealing  with mainframes, not dealing with supercomputers. We're dealing with something that maybe students can have in their house. And that actually made it accessible to many people who are interested in doing OS development. The other thing to note is of course we've got all the tools that came from the GNU projects: You've got the compiler and the shell and all the things you need that came over from GNU. And they were being able to be used by Linus to actually create the Linux kernel. And also at the time that he actually published his announcement the Linux kernel was completely free of all MINIX code. Of course when Linux was developed it was developed using the same philosophy and the same model as the environment that came out of System V and BSD.

And quickly it gained support, it gained a lot of interest and really started to take off what in 1992 the X Windowing System was ported over to the Linux kernel which means you could now have a desktop with windows. You'd open up multiple terminals and people really started to use it. And that's when I got on board. I first used Linux when it was about version 0.98, I think. We downloaded it at university. We started using it on our PCs at home to see what we could do with it. And one other key thing is, before we got the version 1 of Linux it had started using the GPL that's the GNU Public License that came with the free software philosophy from the GNU Foundation. So now you have this open source free software that everybody is able to contribute to.

Linux today (09:08-12:55)

And now you wind fast forward to today and we can see that Linux is absolutely everywhere. So the popularity of Linux is undisputed. It runs at the heart of the Android operating. Since that means literally there are millions of people every day, who are using Linux. You've got it on servers. 60% of those web servers on the internet are using Linux and of course you've got it in things like Chrome OS and so on. But to that end Linux isn't a version of Unix, it's a clone of Unix or today they like to call it "Unix-like" because UNIX was actually a product sold by AT&T through its System V branch and it was an operating system developed from Berkeley University. So Linux is doesn't use that source code but it uses that philosophy. It's a clone. It's Unix-like. So where are we today well obviously Linux is still used in many, many places. And BSD, those BSD source codes kind of morphed into FreeBSD which you can download and install on a PC even today. And through various different kind of merges and workings you'll find part of it even actually in Mac OS through NextStep and then down into the new version of Mac OS which Steve Jobs kicked off once he returned to the company. So in that end actually you'll find that the most popular version of  Unix in use today is Mac OS X.

Before I made this video I had a quick search with the whole Linux development tree and you can still find references back to Unix in the tree in two particular cases. One is in some files it will mention that the file originally came from Unix and however it's now been rewritten and changed to be completely open source code and in second place there are many many interfaces; many, many ways that things work, the philosophy of Unix that you still find in Linux and so therefore there are various labels and various things are tagged as Unix because actually that was the way that Unix did it and so that's the way that Linux does it. Now I wanted to see how well this has stood up to history. So I found some source code to Ultrix 4.3 which is a version of the BSD Unix that DEC released in the mid-80s. And I took one of the files in there in this particular one it was backgammon a a terminal version of backgammon and then I copied the source file over onto my Raspberry what it would work now there were some differences in how the C compiler work today. It took me about five minutes to fix those and then, voila! I had a version of backgammon running on my Raspberry Pi from an original version of the source code that was released, oh how long ago is that, thirty years ago and it still works because Linux is a UNIX clone and the UNIX we had then and the Unix Linux that we have now they are very very highly compatible of course that's sort code compatible. Binary compatibility is a whole different story. There are some binary compatibility layers between various versions of Linux and FreeBSD and so on but let's not worry about that now.

Just to clarify a couple things at the end you know of course a Linux distributions are we talking like you know Redhat or Fedora or Ubuntu or Arch or whatever your favorite version links distribution is - includes much more than just than in its kernel. Of course you've got a whole bunch of tools like you know the KDE desktop and the Gnome desktop and things like LibreOffice and Chrome and Firefox, and all these things that are included. And that's absolutely fine and at the heart of it is the Linux kernel. And FreeBSD is the same. If you get a freebsd distribution it comes with the FreeBSD kernel which is based on the source code that was released by BSD 4.4 light. But then on top of that you've got the desktop and applications like Firefox or so on that are actually part of the greater ecosystem of free software.

Summary (12:55-13:59)

OK, so in summary Unix is actually a product that was sold by 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 and that was used for operating systems like FreeBSD and to some extent operating systems like Mac OS which we have today. Linux was written using MINIX as a way of writing a UNIX clone or a Unix-like operating system. And today it doesn't share any files with the original versions of UNIX from back in the 70s and 80s. And ultimately free software has won the day here because of course Linux is so popular not only on servers but also on smart phones.

So my name is Gary Sims and this is Gary explains. I really hope you enjoyed this video if you did please do give it a thumbs up. If you've got any questions about UNIX and Linux please ask me in the comments below and I will try my best to reply. And I'm going to ask you to do please subscribe and please share this video on social media okay well that's about it so I'll see you in the next one.


[1] https://en.wikipedia.org/wiki/Ken_Thompson

[2] https://en.wikipedia.org/wiki/Dennis_Ritchie

[3] https://en.wikipedia.org/wiki/The_C_Programming_Language

[4] https://en.wikipedia.org/wiki/Brian_Kernighan

[5] https://en.wikipedia.org/wiki/Multics

[6] https://en.wikipedia.org/wiki/History_of_Unix#1980s

[7] https://en.wikipedia.org/wiki/Unix_philosophy

[8] https://en.wikipedia.org/wiki/POSIX

Last modified: බ්‍රහස්පතින්දා, 16 දෙසැම්බර් 2021, 8:33 ප.ව.