Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

Me and a friend had a discussion about Linux and Unix today and my friend kept saying that the first version of the Linux kernel was based on [parts] of the Unix kernel.

This really surprised me because I always thought that the architecture of Linux is just similar to Unix — since the very first version. So, is it really true that the first Linux version was based on parts of Unix?

share|improve this question

marked as duplicate by Thomas Dickey, cas, don_crissti, Anthon, dr01 Jun 4 at 17:41

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

A little known fact is that Linux was a release of Emacs that became sentient while running on Minix... – Bart Silverstrim Jan 24 '12 at 14:54
Are you talking about 1) using the source code, 2) about interfaces, services and principal design, or 3) the system where the code was bootstrapped? – user unknown Jan 24 '12 at 15:53
I'm talking about 1). – js-coder Jan 24 '12 at 16:50
Was your friend named "Darl McBride" ? – Shadur Jan 25 '12 at 11:40
up vote 19 down vote accepted

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.

share|improve this answer

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.

share|improve this answer
What do you base the assertion on that OSX is "fully unix compatible"? – psusi Jan 24 '12 at 23:55
@psusi opengroup.org/openbrand/register <--- it's listed as registered UNIX under "UNIX 03". Lion isn't on that list, but afaiac it is: images.apple.com/macosx/docs/OSX_for_UNIX_Users_TB_July2011.pdf (1st page, left column under "Open source UNIX foundation" – polemon Jan 25 '12 at 2:59
That is basically a list of companies who have paid the open group to put their name there. It does not mean that Linux is not just as unix compatible; just that nobody has paid the open group to say it is. – psusi Jan 25 '12 at 14:54
@psusi You only get on that list, when you run a test-suite on your OS. If you pass those tests, you get one one of several lists, depending whether it's fully compatible, or just to some extend. Here's the guideline for UNIX 03: opengroup.org/openbrand/docs/UNIX03_Certification_Guide.html The test requirements are linked in there somewhere... – polemon Jan 25 '12 at 15:01
Note that there are now Linux based operating systems that are Unix certified, so the To this date, Linux is not fully UNIX compatible statement is no longer true. – Stéphane Chazelas Jun 3 at 8:33


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 (torvalds@kruuna.helsinki.fi)

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 :-(.

share|improve this answer
What do you mean "...an API, which will never be replaced"? – Wildcard Jun 2 at 21:50
Yep, the Linux kernel never had any UNIX source code. See en.wikipedia.org/wiki/History_of_Unix#/media/… – Emmanuel Rosa Jun 2 at 22:25
I fiddled the answer a bit to explain "never replaced". The API details are para 5 - basically everything there should match the unix api. – sourcejedi Jun 2 at 23:00
On August 25, 1991, Torvalds posted to comp.os.minix: "Hello everybody out there using minix—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)." – fpmurphy1 Jun 3 at 1:25
'it turned out all this lauded "IP" meant was the APIs which were already considered not to be under copyright' - ah, those were the days... – underscore_d Jun 4 at 1:36

Not the answer you're looking for? Browse other questions tagged or ask your own question.