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
Paid Minimalist Brave Browser? Yes, Please!

Want to pay for a streamlined, minimalist web browser without all the extra features? That's Brave Origin. Bonus: Free for all Linux users.

Remember: If you're not paying for the product, you are the product.

Ubuntu 4.10, C64, & BeOS added to the Wall!
https://lunduke.substack.com/p/ubuntu-410-joins-lunduke-journal

Get on The Wall with a Massively Discounted Lifetime Sub:
https://lunduke.substack.com/p/50-off-yearly-and-massively-discounted

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

00:16:47
Which Operating Systems Are Refusing to Do Age Verification?

As Microsoft, Apple, Google, & many Linux Distros rush to implement Age Verification in their systems, let's walk through which Linux versions are fighting back.

OS Age Verification Status:
https://github.com/BryanLunduke/DoesItAgeVerify

Ubuntu 4.10, C64, & BeOS added to the Wall:
https://lunduke.substack.com/p/ubuntu-410-joins-lunduke-journal

Get on The Wall with a Massively Discounted Lifetime Sub:
https://lunduke.substack.com/p/50-off-yearly-and-massively-discounted

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

00:14:55
Lunduke's Week in Tech: June 14 - June 20, 2026

The Great Linux/BSD Display Server War(tm) continues to rage on!

Links to all the stories:
https://lunduke.substack.com/p/lundukes-week-in-tech-june-14-june

Ubuntu 4.10, C64, & BeOS added to the Wall!
https://lunduke.substack.com/p/ubuntu-410-joins-lunduke-journal

Get on The Wall with a Massively Discounted Lifetime Sub:
https://lunduke.substack.com/p/50-off-yearly-and-massively-discounted

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

00:18:06
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
post photo preview
Ubuntu 4.10 joins Lunduke Journal Lifetime Wall!

TL;DR

Ubuntu 4.10, C64, & BeOS Lifetime Walls are now available for Lifetime Subscribers to put their names on! Plus: Lifetime Subscriptions are massively discounted through end of June (roughly 10 days).

Ubuntu 4.10 Lifetime Wall

Remember when Linux was fast, light, and required only 64 MB of RAM?

The Lunduke Journal remembers.

Let’s celebrating those good old days by adding a new “Lifetime Subscriber Wall” of the very first version of Ubuntu (4.10), released all the way back in 2004.

This brings the total number of Lifetime Subscriber Walls up to 14 (fourteen!), with 11 Walls completely, totally filled with the names of Lunduke Journal supporters.

That’s wild!

Three Retro Lifetime Walls Open

Which means there are 3 Walls currently available to put your signature on:

  • Commodore 64 : Half full

  • BeOS R5 : 1/3rd full

  • Ubuntu 4.10 : Just opened

 

Man. Look at that Ubuntu 4.10 screenshot. So very… GNOME 2… and brown. That, right there, is how I like to remember Ubuntu.

Support The Lunduke Journal & Get on The Wall

Grabbing a Lifetime Subscription to The Lunduke Journal — and getting your name on one of the Retro Computer Lifetime Subscriber Walls — is the best way to show your support for truly independent Tech Journalism.

  1. Grab a Lifetime Subscription (1 name on 1 Wall per Lifetime Subscription), scroll down for the links.

  2. Then Email Lunduke (“[email protected]”) with which Retro Computer Wall you would like to appear on (and what name you would like to use).

Your name will then appear on a Wall… on both Lunduke.com & during the end of Lunduke Journal shows.

Note: These fill up crazy fast. We’re talking days, not weeks. First come, first served. If you want to get on a specific Wall, don’t dilly dally.

Lifetime Discount Runs Through June

For the entire month of June, Lifetime Subscriptions are discounted down to $125 (regularly $300).

How to Grab a Discounted Lifetime Subscription:

There are 3 different ways to pick up a Lunduke Journal Lifetime sub. All of them work great and include the same perks. Choose whichever works best for you!

Get a Lifetime Subscription via Locals:

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

  2. Select “Give Once“.

  3. Enter “125“ 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.)

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.

Get a Lifetime Subscription with Bitcoin:

Bonus: Save an extra $10 with the Bitcoin 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.

-Lunduke

Read full Article
post photo preview
Lunduke's Week in Tech : June 14 - June 20, 2026

Lunduke’s Thoughts of The Week

The Great Linux/BSD Display Server War(tm) continues to rage on!

This week, Valve’s SteamOS finally finished its transition to Wayland by default (demoting Xorg), a move that SteamOS had put off for the last two years. And, just a few days earlier, Slackware (the oldest actively maintained Linux distro) began officially testing XLibre as a replacement for Xorg.

The trend is clear: Xorg is being tossed into the dumpster (at the encouragement of the Xorg team and Red Hat), with Wayland and XLibre each gaining marketshare.

It will be interesting to see how these changes impact overall X11 (in general) vs Wayland marketshare… which has been staying steady at roughly 50/50, across all Linux distros, for a few years now.

This is all happening at the same time as Linux is becoming increasingly developed by AI bot, with over 10% of all code submissions to the kernel being written by AI during the previous week.

The world of Linux is changing… and changing rapidly.

Some of those changes seem great. Others are terrifying.

Sometimes… well… they are both.

Ubuntu 4.10, C64, & BeOS Walls

The support shown to The Lunduke Journal, from all of you, continues to amaze me.

We are now up to 14 (fourteen!) Retro Computer Walls, filled with the names of Lifetime Lunduke Journal Subscribers who want to show their support to the world.

 

The newest walls — Commodore 64, BeOS R5, & Ubuntu 4.10 (the first Ubuntu release) — are now available for you to add your John Hancock to.

Biggest Tech Stories - June 14 - June 20, 2026

Here are the major stories from the last week, with direct links to X and Substack. You can also watch / listen on a bunch of other platforms (Rumble, RSS Audio Podcast, etc.), listed on Lunduke.com.

  • OpenAI Buys Seat on Rust Board for $600K (X, Substack)

  • SteamOS Ditches X11 for Wayland (X, Substack)

  • Islamic Terrorists Attack Disney+ (X, Substack)

  • The Commodore Smartphone Blocks Social Media & Browsers (X, Substack)

  • AI Submissions to Linux Hits New Record, 10% of All Patches (X, Substack)

  • Slackware Tests Replacing Xorg with XLibre (X, Substack)

Huge thank you to all of The Lunduke Journal’s subscribers. You make all of this possible.

-Lunduke

Read full Article
post photo preview
"C64" & "BeOS" Lunduke Journal Lifetime Walls open!

The “TempleOS” and “Macintosh System 1” Lunduke Journal Lifetime Subscriber Walls are full! Those suckers filled up in a single week! (You can check them all out at Lunduke.com.)

But, behold! The “Commodore 64” and “BeOS R5” Walls are now available to add your names to!

  • Windows 2000 : 2 spots left

  • Commodore 64 : Space available

  • BeOS R5 : Space available

 

Those last two spots on the Windows 2000 Wall won’t last long. And, honestly, I expect the C64 Wall to by full pretty quickly.

Don’t have a Lifetime Subscription yet?

Already have a Lifetime Subscription to The Lunduke Journal?

  • Email “bryan at lunduke.com” with which Wall you would like to be on, and how you’d like your name displayed (nickname, full name, etc.).

There are roughly 12 days left in June. How many Retro Computer themed Lifetime Walls can we fill up before the end of the month? Let’s find out!

Huge thank you to each and every one of you! You make The Lunduke Journal possible.

-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