Lunduke
News • Science & Tech
The Fork Bomb: What it is, how it works, and where it originated
The idea started in 1969... and it's been causing computers to crash ever since.
December 03, 2023
post photo preview
:(){ :|:& };:

That simple line has been crashing systems in the Linux world for years — It is known as the (infamous) “BASH Fork Bomb”.

When run in a GNU/BASH shell, this BASH variant of the Fork Bomb will bring your average Linux system to its knees, lickety-split. A mere handful of characters that can cause a computer to cry “Uncle.”

But what, exactly, is a “Fork Bomb”? How do they work? And where on this green Earth of ours were they first created?

Come with me on a journey into the history, design, and usage of one of the most dastardly ideas in all of computing… of The Fork Bomb!

What is a Fork Bomb?

The idea of a Fork Bomb is simple: Create a piece of code that does one thing and one thing only: replicate running instances of itself. And do so as quickly as possible.

Here, a visual will help drive the idea home.

In this case each Bunny Rabbit represents one instance of the Fork Bomb. Each bunny makes two new bunnies. Quickly. Multiplying like, well, rabbits.

Each of those adorable little bunny rabbits may not take up much RAM… or much CPU time… but imagine 20 of them. Or 1000. Or, like, a bazillion?! That Fork Bomb will continue making running copies of itself just as long as the system allows it to (by continuing to have available memory or not fully crash).

With how quickly each Fork Bomb replicates itself… and the number of copies growing exponentially… you can see how they can become a problem in a hurry. Often causing a system to lock up quicker than you can say, “Maybe I shouldn't have pressed Enter.”

A real-world example… and how it works

Let’s take a look at that BASH version of the Fork Bomb again (as that is one of the most popular and famous examples).

(If you don’t know how BASH scripting works, no worries. I’ll break it down… make it nice and easy.)

:(){ :|:& };:

Ok. So how does this, ridiculous looking, collection of semi-random seeming characters, actually work?

Let’s break that apart into multiple lines to make it all easier to read.

: ( ) {

   : | : &

} ; :

This… is a BASH script function.

But there’s something… weird about it. Note the many usages of “:”? In this case “:” is being used as a function name.

“Why is using “:” as a function name weird,” you ask?

Because, on most UNIX-y systems, it is not allowed to use a character in a function name other than letters and numbers (and underscores). But the GNU version of BASH — which is commonly used on oh-so-many Linux systems — allows : and so many other characters to be used.

Why does GNU allow a “:”? Who knows. GNU be crazy.

Regardless…

Let’s replace the “:” in that BASH script with “rabbit”. That will, in addition to making it run on more UNIX systems, make this a bit easier to read.

rabbit() {
rabbit | rabbit &
}; rabbit

There. So much better. Here we go. Line by line.

Line 1: rabbit() {

That first line does something simple. It defines a function named “rabbit”. That’s it and that’s all.

Line 2: rabbit | rabbit &

Line 2 is the insidious part.

It calls the function named “rabbit”, and sends the output of that function to the function named “rabbit.”

But, here’s the thing, there really isn’t any output of the “rabbit” function. So this is really just a fancy way of calling the “rabbit” function twice… at the same time.

Yeah. The “rabbit” function calls itself, from within itself, then calls itself again.

Oh, and that “&” at the end? That's the BASH way of telling “rabbit” to run in the background.

The net result? Every “rabbit”, makes two new “rabbit”s.

Line 3: }; rabbit

That last nine simply ends the “rabbit” function… and then calls itself.

Note: I highly recommend not running this code on your system unless you do so in a virtual machine. Without taking the proper precautions… this will bring your system to its knees.

Every variation of a Fork Bomb operates in a roughly similar fashion. A small piece of code that creates copies of itself… repeatedly. Thus eternally replicating itself until the system runs out of resources.

The first Fork Bomb

The very first known usage of a “Fork Bomb” was way back in 1969 at the University of Washington.

There, a Burroughs B5500 computer had been installed three years earlier. A big computer that provided the first time-sharing system on the University of Washington campus (through a series of dial-up modems running at 110 baud). This was also the first computer at the University of Washington to provide disk storage for user files. Pretty cool.

A Burroughs B-5500. Not the one at the U of W, though. Classy looking machine, right?

On that big, beautiful Burroughs B-5500, someone reportedly wrote a small bit of code that would make two copies of itself — over and over again — until the memory of the machine was full and the entire system would crash.

That intrepid programmer named that tiny little program, appropriately: “RABBITS”

Fun historical tidbit: RABBITS for the Burroughs B-5500 was not, technically the first computer virus. That distinction appears to go to the 1971 “Creeper Virus”. While RABBITS predated Creeper by a good two years… RABBITS doesn’t really act like a virus. It requires a user to explicitly run it in order to cause its own mischeif.

The 1974 “Wabbit”

A similar piece of code was written on an IBM System/360, a few years later, in 1974. Clearly inspired by “RABBITS”, this new code was called “Wabbit” and was, as Elmer Fudd might say, quite “wascally”.

The IBM System/360 Model 22 control panel. That thing was awesome looking.

Legend has it that the individual who created “Wabbit” ran the program on the System/360 at work… causing the entire system to crash. The man, again according to legend, lost his job.

Fun bit-o-trivia: As years went on any program that would self-replicate when ran by the user… but wasn’t actually a virus… would become known as a "wabbit.” in honor of this particular event.

Some other variations on the Fork Bomb

There have been Fork Bomb type bits of code written in just about every language you can imagine. At the beginning we covered how to write a Fork Bomb in BASH. But, because this sort of mayhem is simply too much fun, below you will find code to create similar bits of functionality in several other programming languages.

Enjoy.

Just… you know… try not to get yourself fired.

Fork Bomb in C:

int main(void) {
for (;;) {
    fork();
}
}
Fork Bomb in Python:

#!/usr/bin/env python

    import os
    while True: os.fork()

Fork Bomb in Ruby:

#!/usr/bin/env ruby
loop { fork { bomb } }
community logo
Join the Lunduke Community
To read more articles like this, sign up and join my community today
6
What else you may like…
Videos
Podcasts
Posts
Articles
Should Taxpayer Money Fund Open Source?

Mozilla, F-Droid, Let's Encrypt, Tor, & more receive huge amounts of money from US taxes. Should they?

00:13:37
Zorin OS (Linux) Ditches Firefox for Brave

The fallout from Mozilla's Terms of Use change continues, as a prominent Linux distribution switches web browsers.

00:13:13
Tor, F-Droid, & Let's Encrypt Lose Tax Payer Funding, Go To Court

The US tax payer funded Open Technology Fund has lost Federal funding and is taking the Trump administration to court. Plus: The shady connection to Firefox maker Mozilla.

00:36:04
November 22, 2023
The futility of Ad-Blockers

Ads are filling the entirety of the Web -- websites, podcasts, YouTube videos, etc. -- at an increasing rate. Prices for those ad placements are plummeting. Consumers are desperate to use ad-blockers to make the web palatable. Google (and others) are desperate to break and block ad-blockers. All of which results in... more ads and lower pay for creators.

It's a fascinatingly annoying cycle. And there's only one viable way out of it.

Looking for the Podcast RSS feed or other links? Check here:
https://lunduke.locals.com/post/4619051/lunduke-journal-link-central-tm

Give the gift of The Lunduke Journal:
https://lunduke.locals.com/post/4898317/give-the-gift-of-the-lunduke-journal

The futility of Ad-Blockers
November 21, 2023
openSUSE says "No Lunduke allowed!"

Those in power with openSUSE make it clear they will not allow me anywhere near anything related to the openSUSE project. Ever. For any reason.

Well, that settles that, then! Guess I won't be contributing to openSUSE! 🤣

Looking for the Podcast RSS feed or other links?
https://lunduke.locals.com/post/4619051/lunduke-journal-link-central-tm

Give the gift of The Lunduke Journal:
https://lunduke.locals.com/post/4898317/give-the-gift-of-the-lunduke-journal

openSUSE says "No Lunduke allowed!"
September 13, 2023
"Andreas Kling creator of Serenity OS & Ladybird Web Browser" - Lunduke’s Big Tech Show - September 13th, 2023 - Ep 044

This episode is free for all to enjoy and share.

Be sure to subscribe here at Lunduke.Locals.com to get all shows & articles (including interviews with other amazing nerds).

"Andreas Kling creator of Serenity OS & Ladybird Web Browser" - Lunduke’s Big Tech Show - September 13th, 2023 - Ep 044

I built a website. Not just a normal website, that's just not nerdy enough.

It's a static site generator. In pure korn shell, with pages written in groff (ms and www macros), running on OpenBSD httpd/relayd.

It's here:

https://andrath.nl/

Source code here: https://github.com/ekollof/andrath.nl
(yeah github, I know, but it's where all the people are at)

It should be easy enough to customize for yourself.

Enjoy!

Not gonna lie, if they made this a standalone product for consumers, I’d be about 98% more likely to go back to Windows…

Help The Lunduke Journal fight against the Tech Goliaths

The corrupt Tech Foundations of the world — WikiMedia, The Linux Foundation, Mozilla, and the rest — have received hundreds of Millions of dollars in donations. The Big Tech giants bring in Billions and Billions ever year.

And there is only one Tech News outlet that is pushing back against these woke, dirty organizations… The Lunduke Journal.

One nerdy David. Against an army of well-funded, woke Tech Goliaths.

Without your support, The Lunduke Journal would not exist.

And, without The Lunduke Journal, many Tech News stories simply would never be told.

From now, through Friday, March 28th, we are running The Lunduke Journal pledge drive.

Make a one time donation (with multiple options, including Bitcoin) — and help keep The Lunduke Journal publishing commercial free, Big-Tech-Free news.

Or grab a discounted subscription and get a few fun perks:

  • Access to the exclusive Forum.

  • Access to exclusive shows (such as Q & A’s).

  • Warm Fuzzy Feelings (tm) that you’re supporting truly independent Tech Journalism.

Scroll down to find the option that works bet for you. Give only what you are able. Together we will tell the Tech News stories that no other Tech News outlet has the guts cover — together we will hold these Tech Goliaths accountable.

Make a One Time Donation

Want to toss in a one-time donation to The Lunduke Journal? There’s a few great options!

Via BitCoin:

Send any amount of BTC to the following address:

bc1qyjakve8fywm8pz2v99v57yhjj0vzr2vjze6fcq

  • Email "bryan at lunduke.com" with to let us know it was you! You can choose to keep your donation anonymous if you prefer.

Via Locals:

  1. Go to Lunduke.Locals.com/support.

  2. Click “GIVE ONCE”.

  3. Enter any amount you like.

Looking for a subscription? Scroll down for options!

50% Off Yearly Subscription:

50% off a Yearly subscription to The Lunduke Journal via both Locals and Substack. (This includes full access to the community Forum.)

That’s $2.25 per month. Pocket change.

The Famous Lifetime Subscription:

The "World Famous Lunduke Journal Lifetime Subscription" is exactly what it sounds like. Pay once and get full access to The Lunduke Journal. For life. A great way to support Big-Tech-Free Journalism.

(This includes full access to the community Forum.)

New Lifetime Subscriptions are available, for $200, from now through Friday, March 28th.

The Lifetime Subscription can be obtained via Locals, Substack, or using Bitcoin. All three options work great and are super easy.

How to get a Lifetime Subscription via Locals:

  1. Go to Lunduke.Locals.com/support.

  2. Select "Give Once".

  3. Enter "200" into the amount field.

  4. After checking out, Lunduke will toss you an email once your account is set to full lifetime status. (This usually happens within a few hours.)

How to get a Lifetime Subscription via Substack:

  1. Go to Lunduke.Substack.com/subscribe.

  2. Select the “Lifetime Subscription” option.

  3. After checking out, Lunduke will toss you an email once your account is set to full lifetime status. (This usually happens within a few hours.)

If you would also like full, Lifetime access to Lunduke.Locals.com (which is included):

  1. Make a free account on Lunduke.Locals.com.

  2. Email “bryan at lunduke.com” with the email address you use on both Substack and Locals (can be different email addresses).

  3. Lunduke will toss you an email once your account is set to full lifetime status on Locals.

How to get a Lifetime Subscription with Bitcoin:

And, finally, you can obtain a Lifetime Subscription via Bitcoin. Save a few bucks with this option, as Bitcoin processing has fewer fees associated with it.

bc1qyjakve8fywm8pz2v99v57yhjj0vzr2vjze6fcq

  • Email "bryan at lunduke.com" with the following information: What time you made the transaction, how much was sent (in Bitcoin), and the email address you use (or plan to use) on Locals.com or Substack.com.

50% Off DRM-Free, MP4 Downloads:

Want to be able to download every show The Lunduke Journal releases (and watch them on whatever device you like)? Yeah. You can do that. For 50% off.

Note: This DRM-Free download option does not include access to the Forum. This option is strictly for downloading the episodes.

The Lunduke Journal would not be possible without your support. Every subscriber, of every type, makes a massive difference in bringing Big-Tech-Free Tech Journalism to the world.

This truly is the last bastion of independent Tech Journalism.

Thank you.

-Lunduke

Read full Article
February 24, 2025
post photo preview
12% of Tech Workers Believe macOS is Based on Linux
Over 70% believe in at least one common Myth of Computer History.

The following data was derived from the 2025 Tech Industry Demographic Survey, which included over 12,000 respondents -- from across companies and organizations throughout the Tech Industry -- surveyed during February of 2025.

 

Ready to have your mind blown?

According to those surveyed:

  • Nearly 12% believe that macOS is based on Linux.
  • Over 70% believe in at least one common Myth of Computer History.
  • The most commonly believed myth (at 52%) is the myth that "the first computer bug was a real bug (a moth)".

 

Those who took the survey were presented with 6 common (but debunked) computer history myths... and were asked to select the myths which they believed to be true and factual historical statements.

Here is the breakdown of how many believed in each myth.

 

 

One rather fascinating piece of data: Those percentages held steady for nearly every demographic group within the survey.

For example:

Roughly 12% of respondents who prefer Linux, believe macOS is based on Linux.  The same was true of Windows users, C / C++ programmers, and those who perfer the Firefox Web Browser... no matter what sub-group was looked at... that number stayed roughly steady (around 12%).

The one outlier appeared when I looked at how many myths a person says they believe in... grouped by generic political leanings (Left, Centrist, or Right Leaning).

 

Notice that the percentage of respondents who "Believe at least one myth" or "Believes 4+ myths" stays roughly consistent (with only mild variances) across all three political groupings.

But, if you look at the "Believes 3+ myths" data, there is an 8% spike among those who identify as "Left Leaning".

While all surveyed were likely to believe at least one myth, "Left Leaning" respondents were slightly more likely to believe up to 3 myths (of the 6 presented).

 

The Myths of Computer History

 

For those curious, here are the 6 myths included in the survey (with links to debunk each of them).  

 

Read full Article
February 18, 2025
Lunduke's Birthday! Woo!

Wooo! Today is Lunduke’s birthday! Want to help celebrate this most excellent of holidays? Here’s some totally radical ideas!

1) Share some links to Lunduke Journal shows.

Bonus points if you share those shows to the type of places where people would get mad about it. 🤣

The “Open Source is Anti-Free Speech” video is a great choice. Just remember to take screenshots… because some sites will censor those links faster than you can blink (be sure to let me know if they do censor).

2) Grab a Subscription

Gotta keep the lights on here at The Lunduke Journal! And, shoot, there’s no better gift than the gift of Big-Tech-Free Journalism. 😎

Plus… for the rest of February there’s some massive discounts (like 50% off).

https://lunduke.locals.com/post/6661699/for-february-50-off-subscriptions-50-off-drm-free-downloads-lifetime-subscriptions-available

So, you know, win-win!

Now, if you’ll excuse me, I’m going to go eat some BBQ. Because… birthday.

-Lunduke

 
Read full Article
See More
Available on mobile and TV devices
google store google store app store app store
google store google store app tv store app tv store amazon store amazon store roku store roku store
Powered by Locals