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
Python Says Discriminatory DEI Policies More Important Than $1.5 Million Dollars

The Python Software Foundation has turned down a $1.5 Million Dollar grant from the US government, as it would require them to cease discriminatory Diversity, Equity, & Inclusion practices.

More from The Lunduke Journal:
https://lunduke.com/

00:19:23
October 27, 2025
$20,000 Bounty Offered to Bribe FFmpeg Team to Fire Contributor

A popular YouTuber named Theo Browne offered $20k to the Open Source FFmpeg team if they remove their social media person, who Theo calls a "motherf***er".

The X Thread:
https://x.com/LundukeJournal/status/1982569289237352620

More from The Lunduke Journal:
https://lunduke.com/

00:26:32
October 24, 2025
Rust Clone of Core Utils Breaks Ubuntu Updates

Ubuntu 25.10 dropped the battle tested GNU Core Utils, in favor of the untested, incomplete "uutils". Why? Because they were programmed in Rust. And, as expected, things are breaking.

More from The Lunduke Journal:
https://lunduke.com/

00:16:47
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
1 hour ago

Summary, everybody told to "learn to code" did it, and moved up the ranks to middle management. Are being purged.

Tens of Thousands of White-Collar Jobs Are Disappearing as AI Starts to Bite
https://www.msn.com/en-us/money/careers/tens-of-thousands-of-white-collar-jobs-are-disappearing-as-ai-starts-to-bite/ar-AA1Pnvre

Proof slot-loading is eternal.

post photo preview

I had the fortunate opportunity to attend NetApp INSIGHT 2025 a couple of weeks ago in Las Vegas. It was so, so, so focused on AI. It was kinda ridiculous. The last INSIGHT I attended was in 2023 and AI was talked about, but it was not obsessively hyper-focused-on like this year.

At my day job I am a storage nerd. It's all I do. I am so thankful to have this job, it is what I was born to do.

Did any of you attend INSIGHT as well? I found the keynote talks and featured sessions to be generally useless marketing fluff. The breakout sessions are where the sausage is made. I was able to go to some really exceptional and beneficial breakout sessions. The one on Ansible and the one on ONTAP upgrades were the two best sessions I attended.

October 15, 2025
post photo preview
The Unpublished Anti-Lunduke Hit-Piece
A Tech Journalist interviewed me for a hit-piece article. But the questions made them look bad, and they shelved the story. So I'm publishing their hit-piece for them.

Back in September, shortly after the assassination of Charlie Kirk, I was contacted by a Tech Journalist writing for FossForce.com (a smaller, Open Source focused publication) who was working on an article around Open Source, Antifa, and the Lunduke Journal’s coverage of those topics.

This particular outlet had, several months prior, run an “anti-Lunduke” hit piece without first reaching out for comment — which resulted in their most popular article (at least on social media) in quite some time.

With that in mind, it seemed reasonable that they’d want to repeat that success with another “anti-Lunduke” story.

This time they were doing the responsible thing. They reached out to the subject of the hit-piece article with questions. I like encouraging Tech Journalists when they do actual journalism, so I answered each and every query with easy-to-quote responses.

But, it would appear that the answers they received were not conducive to creating the hit-piece they were hoping for — my guess is they realized their questions made them look like the villain in the story. The villain they, clearly, hoped to portray me as.

They opted to not publish the piece.

So I’m publishing their hit-piece for them.

Below is every question — and every answer (with no edits) — which I was asked, on September 19th, by a Tech Journalist by the name of Christine Hall, writing for FossForce.

Fair warning: This is very, very politically charged.

Enjoy.


September 19th

Hall:

The last time I mentioned you in an article, you castigated me for not reaching out to you beforehand. Well, I’m reaching out now. We’ll see what comes of this.

You do recognize that the vast majority of organizations using the term antifa as a descriptor are not in the least bit terrorist and pose no threat to society -- and indeed, the only threats they might pose to fascist groups are not physical or life-harming?

Lunduke:

Hello Christine! Nice to hear from you!

Many, if not most, of those proclaiming support for Antifa (within Open Source) have also made statements encouraging or supporting violence and discrimination.

Regardless of that fact -- which I have documented extensively in Lunduke Journal coverage -- when violent acts are committed (such as murder, riots, and lynchings) in the name of “Antifa”, to turn around and immediately declare yourself to be “Antifa” is a clear declaration of support of that violence.

Hall:

And why did you feel it necessary to call out Danielle Foré’s [the founder of the elementary OS Linux Distribution] trans status in such an ugly manner?

Lunduke:

There is a noteworthy overlap between “Trans activism” and support for political violence -- including in the recent murder of Charlie Kirk (the murderer’s boyfriend was “Trans”).

In the case of Daniel Fore, he, a leader of an Open Source project, regularly calls for discrimination (and violence) against people he disagrees with -- often in conjunction with his self-declaration as “Trans”.

Thus, his declaration of being “Trans” becomes a part of the overall story.

It is worth noting here that The Lunduke Journal has never -- and would never -- call for discrimination or violence against someone because of how they identify or who they may (or may not) vote for.

This is in stark contrast those, such as Mr. Fore, who consider themselves “Trans” or “Antifa” -- who actively advocate for both discrimination and violence.

Hall:

Mentioning a person’s trans status in ways that are pertinent to your argument necessates rudeness such as calling her a “dude who likes to wear dresses”?

Lunduke:

Dan Fore is, in fact, a dude who likes to wear dresses.

The only reason to view that as a negative is if you view dudes wearing dresses as a negative.

Hall:

I’ll quote you on that, which I’m pretty sure won’t bother you in the least.

Lunduke:

Absolutely! Quote anything I say here. In fact, I suggest quoting absolutely everything I’ve written to you here, today.

Hall:

You also understand, don’t you, that voicing disagreement with an assessment made by POTUS is not only legal but a healthy part of the national dialog.

Lunduke:

Absolutely! Did I say somewhere that it was illegal to disagree with a politician? It seems unlikely that I have ever said that.

Hall:

Also, how would you reply to this:

There have been very few murders linked to individuals associated with Antifa, some incidents of rioting attributed to Antifa supporters, and no credible evidence of lynchings conducted in the name of Antifa. Compared to far-right groups, violence attributed to Antifa is much less frequent and lethal, with only one suspected kill—Aaron Danielson in Portland, by an anti-fascist activist—officially confirmed in recent U.S. history.

Lunduke:

Murder is bad. I am opposed to all murder.

In the context of these discussions, bearing in mind the Kirk murder is important (as many statements were made in response to it). The murderer of Kirk appears to have been pro-Trans and pro-Antifa (based on all available information).

Hall:

Is there any evidence that the suspect was part of an antifa group? I haven’t seen any.

Lunduke:

I have seen some reporting to this effect (including statements from family and messages he wrote).

But, far more important to this story, is the response to the murder among Antifa supporters (including those within Open Source). A large portion of Antifa supporters have celebrated the murder as justified because it killed someone they considered to be a “fascist”.

Hall:

Also, no group should be held responsible for what some deranged person who identifies with the group has done.

Lunduke:

I agree that a broader group should not be held responsible for the actions of a small number of individuals.

However, and this is critically important, it is entirely appropriate to hold people responsible for their own statements and actions.

With that in mind: The overall messaging of Antifa (and Antifa supporters) tends heavily towards violence. Punching, killing, molotov cocktails, etc. are all common messaging used by Antifa (including by those I quote within the Open Source world -- many of whom have advocated violence against myself).

Advocating for violence, then celebrating when violence is committed, are not good things.

Yet we see a great deal of that among Open Source supporters of Antifa.

Read full Article
October 13, 2025
Sale ends in a few hours, Lifetime Subs set up.

Holy moly, you guys are amazing.

A few days ago I published a “50% off” sale for Lunduke Journal subscriptions… and all of you showed up. In a big way.

To everyone who grabbed a Lifetime Subscription over the last few days: All of you are set to full Lifetime access. You should have a confirmation email in your inbox. If not, email me and I’ll make sure you’re setup properly.

That “50% off” sale ends tonight at midnight. So you have a few hours to snag a discounted subscription, if you haven’t already.

A huge thank you to everyone who supports this work. Couldn’t do it without you.

-Lunduke

Read full Article
October 12, 2025
50% Off Lunduke Journal Extended Through Monday (Oct 13th)

Just a quick heads up:

The “50% off every kind of Subscription to The Lunduke Journal” sale has been extended through Monday (October 13th).

So. You know. Grab one at 50% off between now and end of the day on Monday.

To all of you amazing nerds who have picked up a Lifetime Subscription already this weekend: You are awesome. You’ll be receiving a confirmation email, with all of the Lifetime Subscription details, by tomorrow (if you haven’t already).

Oh, and remember how we hit 11 Million views last month? Yeah. We’re well on our way to blowing past those numbers in October.

Wild.

See you all on Monday!

-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