# How much of the original Linux kernel is still around?

**URL:** <https://boards.straightdope.com/t/how-much-of-the-original-linux-kernel-is-still-around/529107>\
**Category:** Factual Questions\
**Created:** [February 15, 2010, 8:02pm UTC](https://boards.straightdope.com/t/how-much-of-the-original-linux-kernel-is-still-around/529107 "2010-02-15T20:02:12Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![ReuvenB](https://avatars.discourse-cdn.com/v4/letter/r/9fc348/32.png) [@ReuvenB](https://boards.straightdope.com/u/ReuvenB)\
**Post date:** [February 15, 2010, 8:02pm UTC](https://boards.straightdope.com/t/how-much-of-the-original-linux-kernel-is-still-around/529107/1 "2010-02-15T20:02:12Z")

</div>

While thinking about Linux (because I’m weird), a question came up in my mind. How much of the kernel as it was originally written by Torvalds in 1991 remains in the current stable release (2.6.32.8 according to wikipedia)? How many lines of code are the same? Is there any part of it that hasn’t been rewritten?

---

<div class="post-metadata">

**Author:** ![Capt.Ridley\_s\_Shooting\_Party](https://avatars.discourse-cdn.com/v4/letter/c/cc9497/32.png) [@Capt.Ridley\_s\_Shooting\_Party](https://boards.straightdope.com/u/Capt.Ridley_s_Shooting_Party)\
**Post date:** [February 15, 2010, 9:56pm UTC](https://boards.straightdope.com/t/how-much-of-the-original-linux-kernel-is-still-around/529107/2 "2010-02-15T21:56:39Z")

</div>

I doubt there’s much, if any at all. The first kernel was essentially reliant on Minix, hardwired for Finnish keyboards and heavily biased toward x86. Torvalds claimed the system was basically unportable to anything other than a 386 and gcc, but was ported to other architectures relatively quickly (probably entailing extensive rewriting).

---

<div class="post-metadata">

**Author:** ![aceplace57](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/aceplace57/32/3500_2.png) [@aceplace57](https://boards.straightdope.com/u/aceplace57)\
**Post date:** [February 15, 2010, 10:03pm UTC](https://boards.straightdope.com/t/how-much-of-the-original-linux-kernel-is-still-around/529107/3 "2010-02-15T22:03:04Z")

</div>

😕 Linus Torvalds is still writing updates to the kernel. Rumors that Linus has a new version always creates a huge buzz in the Linux community. He may have rewritten most of the code since 1991.

> [@](#):
>
> The current development model of the Linux kernel is such that Linus Torvalds makes the releases of new versions, also called the “vanilla” or “mainline” kernels, meaning that they contain the main, generic branch of development. This branch is officially released as a new version approximately every three months, after Torvalds does an initial round of integrating major changes made by all other programmers, and several rounds of bug-fix pre-releases.

---

<div class="post-metadata">

**Author:** ![ReuvenB](https://avatars.discourse-cdn.com/v4/letter/r/9fc348/32.png) [@ReuvenB](https://boards.straightdope.com/u/ReuvenB)\
**Post date:** [February 15, 2010, 10:04pm UTC](https://boards.straightdope.com/t/how-much-of-the-original-linux-kernel-is-still-around/529107/4 "2010-02-15T22:04:28Z")

</div>

> [@aceplace57](#):
>
> 😕 Linus Torvalds is still writing updates to the kernel. Rumors that Linus has a new version always creates a huge buzz in the Linux community.

I’m talking about the original version of the kernel as he released it in 1991.

---

<div class="post-metadata">

**Author:** ![Fubaya](https://avatars.discourse-cdn.com/v4/letter/f/c2a13f/32.png) [@Fubaya](https://boards.straightdope.com/u/Fubaya)\
**Post date:** [February 15, 2010, 10:53pm UTC](https://boards.straightdope.com/t/how-much-of-the-original-linux-kernel-is-still-around/529107/5 "2010-02-15T22:53:05Z")

</div>

I doubt much of the original is still around, but you might find some code from the 1.0 kernel unchanged. Probably not much, they often rewrite certain parts of the kernel from scratch, but surely a few lines of code have worked through the years.

---

<div class="post-metadata">

**Author:** ![psychonaut](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/psychonaut/32/4655_2.png) [@psychonaut](https://boards.straightdope.com/u/psychonaut)\
**Post date:** [February 15, 2010, 11:25pm UTC](https://boards.straightdope.com/t/how-much-of-the-original-linux-kernel-is-still-around/529107/6 "2010-02-15T23:25:47Z")

</div>

This should be easy enough to test. Grab the current kernel source, plus the source of the first kernel, and run some diffs.

---

<div class="post-metadata">

**Author:** ![Superfluous\_Parentheses](https://avatars.discourse-cdn.com/v4/letter/s/8edcca/32.png) [@Superfluous\_Parentheses](https://boards.straightdope.com/u/Superfluous_Parentheses)\
**Post date:** [February 16, 2010, 12:51am UTC](https://boards.straightdope.com/t/how-much-of-the-original-linux-kernel-is-still-around/529107/7 "2010-02-16T00:51:22Z")

</div>

> [@psychonaut](#):
>
> This should be easy enough to test. Grab the current kernel source, plus the source of the first kernel, and run some diffs.

Hold on a moment…

---

<div class="post-metadata">

**Author:** ![Superfluous\_Parentheses](https://avatars.discourse-cdn.com/v4/letter/s/8edcca/32.png) [@Superfluous\_Parentheses](https://boards.straightdope.com/u/Superfluous_Parentheses)\
**Post date:** [February 16, 2010, 12:58am UTC](https://boards.straightdope.com/t/how-much-of-the-original-linux-kernel-is-still-around/529107/8 "2010-02-16T00:58:28Z")

</div>

Ok, there are no files at all in the linux-1.0 distribution that are identical (ignoring whitespace) to their counterparts in the 2.6.33-rc3 branch.

I checked a few basic header files but even there the changes appear to be large.

---

<div class="post-metadata">

**Author:** ![ReuvenB](https://avatars.discourse-cdn.com/v4/letter/r/9fc348/32.png) [@ReuvenB](https://boards.straightdope.com/u/ReuvenB)\
**Post date:** [February 16, 2010, 1:00am UTC](https://boards.straightdope.com/t/how-much-of-the-original-linux-kernel-is-still-around/529107/9 "2010-02-16T01:00:53Z")

</div>

Interesting. I think this may be an example of Theseus’ paradox. If all the parts have been replaced, is it still the same thing?

---

<div class="post-metadata">

**Author:** ![aceplace57](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/aceplace57/32/3500_2.png) [@aceplace57](https://boards.straightdope.com/u/aceplace57)\
**Post date:** [February 16, 2010, 1:07am UTC](https://boards.straightdope.com/t/how-much-of-the-original-linux-kernel-is-still-around/529107/10 "2010-02-16T01:07:00Z")

</div>

Interesting, I thought he had coded more than that.  
Apparently, nearly all the code from 1991 has been replaced.

> [@](#):
>
> About 2% of the Linux kernel as of 2006 was written by Torvalds himself.[14] Since Linux has had thousands of contributors, such a percentage represents a significant personal contribution to the overall amount of code. Torvalds remains the ultimate authority on what new code is incorporated into the standard Linux kernel.[

> **[Linus Torvalds](https://en.wikipedia.org/wiki/Linus_Torvalds)**
>
> Linus Benedict Torvalds\[a\] (born 28 December 1969) is a Finnish and American software engineer who is the creator and lead developer of the Linux kernel since 1991. He also created the distributed version control system Git.
> Torvalds was one of the recipients of the 2012 Millennium Technology Prize "in recognition of his creation of a new open source operating system for computers leading to the widely used Linux kernel". He is also the recipient of the 2014 IEEE Computer Society Computer Pion...

---

<div class="post-metadata">

**Author:** ![ReuvenB](https://avatars.discourse-cdn.com/v4/letter/r/9fc348/32.png) [@ReuvenB](https://boards.straightdope.com/u/ReuvenB)\
**Post date:** [February 16, 2010, 1:09am UTC](https://boards.straightdope.com/t/how-much-of-the-original-linux-kernel-is-still-around/529107/11 "2010-02-16T01:09:09Z")

</div>

Unfortunately, Wikipedia doesn’t say how much, if any, of that 2% was present in the original kernel.

---

<div class="post-metadata">

**Author:** ![Superfluous\_Parentheses](https://avatars.discourse-cdn.com/v4/letter/s/8edcca/32.png) [@Superfluous\_Parentheses](https://boards.straightdope.com/u/Superfluous_Parentheses)\
**Post date:** [February 16, 2010, 1:17am UTC](https://boards.straightdope.com/t/how-much-of-the-original-linux-kernel-is-still-around/529107/12 "2010-02-16T01:17:04Z")

</div>

> [@ReuvenB](#):
>
> Interesting. I think this may be an example of Theseus’ paradox. If all the parts have been replaced, is it still the same thing?

Well, it’s also grown a bit. The 1.0 version had 141,361 lines in 282 .c files. My (patched) 2.6.33-rc3 branch has 9,329,339 lines in 15895 .c files. That’s about 66 times the size of the “original”.

I’m amazed the git allows you to switch between branches as fast as it does with that much code (by the way, the Linus’s git repo only records the history going back to 2005 / 2.6.12-rc2, so you can’t use it to track the differences all the way back to 1.0 - and the early stages weren’t in a version tracker as far as I know).

> [@commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2](#):
>
> Author: Linus Torvalds \<torvalds@ppc970.osdl.org\>  
> Date: Sat Apr 16 15:20:36 2005 -0700
> 
> ```
> Linux-2.6.12-rc2
> 
> Initial git repository build. I'm not bothering with the full history,
> even though we have it. We can create a separate "historical" git
> archive of that later if we want to, and in the meantime it's about
> 3.2GB when imported into git - space that would just make the early
> git days unnecessarily complicated, when we don't have a lot of good
> infrastructure for it.
> 
> Let it rip!
> 
> ```

git infrastructure has improved a lot since 2005, but I doubt many people are interested in a 3+ Gb repository - the current one is “only” 372Mb, which saves a bit on download time.

---

<div class="post-metadata">

**Author:** ![Capt.Ridley\_s\_Shooting\_Party](https://avatars.discourse-cdn.com/v4/letter/c/cc9497/32.png) [@Capt.Ridley\_s\_Shooting\_Party](https://boards.straightdope.com/u/Capt.Ridley_s_Shooting_Party)\
**Post date:** [February 16, 2010, 10:11am UTC](https://boards.straightdope.com/t/how-much-of-the-original-linux-kernel-is-still-around/529107/13 "2010-02-16T10:11:25Z")

</div>

> [@aceplace57](#):
>
> Interesting, I thought he had coded more than that.  
> Apparently, nearly all the code from 1991 has been replaced.
> 
> [Linus Torvalds - Wikipedia](http://en.wikipedia.org/wiki/Linus_Torvalds)

The majority of contributed code added to the Linux kernel comes from private corporations, now.
