Is it true that the first version of Linux was based on parts of Unix?

Even if Linux was a system written from scratch, first version of Linux was very minix-lookalike, which is a "mini-Unix". It's in Linus' announcement.

Wikipedia provides a short description of Linux history. If you want to know more about this subject, this book is what you need. You'll learn there that Linus Torvalds used Unix man pages in order to know what system calls he has to implement and how they had to work.


The first Linux kernels had to be bootstrapped with MINIX, which was developed with a UNIX-like design in mind. Now, Linus used books on UNIX when he was designing his kernel. The date of his book order is even archived.

To this date, Linux is not fully UNIX compatible, therefore, it's designated as "UNIX-Like" (Mac OS X, on the other hand, is a (full) UNIX).

The title of your question states simply "Linux" which implies not only the kernel, but other parts of it as well. I'd argue, that when you take into account things outside the kernel to compare it with UNIX, it is even more alike. Given things like X, etc. The Linux kernel alone comes pretty close to UNIX, but when you take into account the GNU parts, it gets even closer.

The 0.01 version of the kernel, can be still downloaded. Although, I haven't tested whether it compiles, let alone runs.


No.

It doesn't make sense to say the first version of Linux in particular was "based on parts of" Unix. It was not a port of the Unix kernel. It did not start with Unix code in the first versions [browse source] and replace it over time. Linus did not have access to Unix source code [interview].

What it copied from is the API. The same API is in the latest version of Linux, and will remain forever. As a rule Linux does not remove any API because that would break some application. What is copied is the minimum necessary, when Linux (and the first version of Linux libc) was written to run existing Unix applications. This is a well-known fundamental ability of Linux. You can describe that in different ways, but there's not really anything to argue about here.

E.g. same API is copied in GNU libc (which predates Linux). IIRC Linux effectively copied from API documentation (man pages).

I'm loath to say even that, due to the best part of the design of the interface between Unix kernel and applications, like gcc; "everything is a file". Fundamental file operations were standardized as part of the C programming language. My manpages suggest C89, i.e. a year or so earlier. E.g. Windows implements the same C API. However that glosses over too many fiddly bits that aren't files and/or which C didn't include in the standard, so we have to acknowledge Linux as specifically Unix-like.

Specifically the API in this "first" version of Linux is 70 system calls, their argument lists, 40 error codes... and outweighing either of those, 200 lines defining terminal controls which is just what I was thinking of when I wrote "fiddly bits". But certainly there's more later as well.

As hinted elsewhere, this is a bit of sore spot. Since it's been brought up in a Microsoft-funded "study", and then litigated for years (SCO v IBM) without any evidence. IIRC they eventually showed a few lines of code. It turned out all the "infringing IP" (which they claimed IBM added to Linux) was just some APIs. Despite multiple precedents at this point permitting the copying of APIs, aka clean-room reverse engineering.


As mentioned by others, the relation with Minix was tighter. I believe the filesystem format was taken from Minix. Data structures are more implementation-specific than most abstract API's, and if you said "based on parts of" Minix you would not necessarily be lying.

Minix is also described as a Unix-like (or "Unix clone", which means an OS similar to Unix but not based on its code). In any sense Linux is based on Unix, the same should apply to Minix. (There are some other Unix clones too; Wikipedia lists some proprietary ones and various compatibility layers for Windows).

I'm doing a (free) operating system (just a hobby, won't be big and professional like gnu) for 386(486) AT clones. This has been brewing since april, and is starting to get ready. I'd like any feedback on things people like/dislike in minix, as my OS resembles it somewhat (same physical layout of the file-system (due to practical reasons) among other things).

I've currently ported bash(1.08) and gcc(1.40), and things seem to work. This implies that I'll get something practical within a few months, and I'd like to know what features most people would want. Any suggestions are welcome, but I won't promise I'll implement them :-)

Linus ([email protected])

PS. Yes - it's free of any minix code, and it has a multi-threaded fs. It is NOT portable (uses 386 task switching etc), and it probably never will support anything other than AT-harddisks, as that's all I have :-(.

Tags:

Linux

History