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
January 20, 2025
Linux Distro Declared "Non-Woke", Causing New Users & Interest to Skyrocket

While "Woke" Linux Distributions (like openSUSE) are struggling to survive, interest in OpenMandriva - a non-Woke Open Source project - is exploding.

00:29:15
January 19, 2025
Godot Game Engine Went Woke... And Lost $160,000 Per Year.

A few months ago, the Open Source Godot Game Engine enacted a mass "cleansing" of Non-Woke supporters. Then their monthly donations dropped by over 25%.

00:10:46
January 17, 2025
Tech Journalists Rally in Support of Racism and Sexism in Big Tech

"Save me from rich, white men," declares the Tech Journalists in response to some Big Tech firms decreasing racist DEl spending.

00:31:20
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
January 13, 2025
Last 24 Hours: 55% off DRM-Free MP4s, & Discounted Lifetime Subscriptions

Holy guacamole, Batman! We are now over 80% of the way to our funding goal… for the end of February. And it’s not even half way through January! I am absolutely gobsmacked.

Want to help push us over the 100% line — and directly fund the truly independent Tech Journalism of The Lunduke Journal?

Lots of options. Big and small (and all amazingly helpful). Scroll down & choose whatever works best for you.

Lunduke Journal Discounts

For the next 24-sh hours (through Tuesday, January 14th), in addition to regular subscriptions, you can grab two limited discounts:

  1. Discounted Lifetime Subscriptions (details below)

  2. DRM-Free, MP4 Downloads for 2024 & 2025 (combined) for 55% off.

There many ways to support The Lunduke Journal. Choose the option that makes you smile. It’s all listed below.

Where to grab a Monthly or Yearly Subscription:

Lifetime Subscription Details:

  • Pay once, full subscription for life (on Locals, Substack, or both).

  • Available only through Tuesday, January 14th. Then the Lifetime Subscription option goes “back in the vault”.

  • Can be purchased via Locals, Substack, or with Bitcoin. Scroll down for steps.

Where to buy a DRM-Free, MP4 video yearly download pass:

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.

The Famous Lifetime Subscription via Locals

The "World Famous Lunduke Journal Lifetime Subscription" is exactly what it sounds like. Pay once and get full access to The Lunduke Journal (with all the perks of subscription on Locals). For life.

New Lifetime Subscriptions are available, for $200, from now through January 14th. Then this option goes "back into the vault".

Here's how to grab one of these coveted bad boys for yourself:

  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.)

The Famous Lifetime Subscription via Substack

You can also snag 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 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.

The Famous Lifetime Subscription (with Bitcoin discount)

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.

  • Make sure you have a Lunduke.Locals.com account (a free account works just fine).

  • Send $190 worth of Bitcoin (or more) to the following address:

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.

Nice and easy. Lots of options.

Once again, thank you. The Lunduke Journal would not be possible without your support.

You rule.

-Lunduke

Read full Article
January 12, 2025
Discounted Lifetime Subs, 55% Discount on MP4 Downloads for 2 Days

The Lunduke Journal remains 100% free from advertising… and, even more importantly, 100% free from all Big Tech influence.

And, because we never take a penny from any company, this is only possible thanks to you.

All of you amazing nerds showed tremendous support for The Lunduke Journal last month — grabbing Lifetime and standard subscriptions — meeting our necessary funding requirements for January… before January even started.

Mind. Blown.

This allows me to focus on new reporting — without needing to worry so much about funding and “business stuff” during the month. Which means more shows & more investigations. A massive win for all of us.

That also means that, this month, we don’t need to do a big “fundraiser”. Instead, we’re going to just send out this quick reminder of how absolutely critical your support is for the continued success The Lunduke Journal — the last bastion of truly independent Tech Journalism.

Seriously. Couldn’t do this without you.

Scroll down and take a look at the options. See if any jump out at you. Then give yourself a high five for making Tech Journalism that much more awesome.

Lunduke Journal Discounts

For the next 2 days (through Wednesday, January 15th), in addition to regular subscriptions, you can grab two limited discounts:

  1. Discounted Lifetime Subscriptions (details below)

  2. DRM-Free, MP4 Downloads for 2024 & 2025 (combined) for 55% off.

There many ways to support The Lunduke Journal. Choose the option that makes you smile. It’s all listed below.

Where to grab a Monthly or Yearly Subscription:

Lifetime Subscription Details:

  • Pay once, full subscription for life (on Locals, Substack, or both).

  • Available only until Wednesday, January 15th. Then the Lifetime Subscription option goes “back in the vault”.

  • Can be purchased via Locals, Substack, or with Bitcoin. Scroll down for steps.

Where to buy a DRM-Free, MP4 video yearly download pass:

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.

The Famous Lifetime Subscription via Locals

The "World Famous Lunduke Journal Lifetime Subscription" is exactly what it sounds like. Pay once and get full access to The Lunduke Journal (with all the perks of subscription on Locals). For life.

New Lifetime Subscriptions are available, for $200, from now through January 15th. Then this option goes "back into the vault".

Here's how to grab one of these coveted bad boys for yourself:

  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.)

The Famous Lifetime Subscription via Substack

You can also snag 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 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.

The Famous Lifetime Subscription (with Bitcoin discount)

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.

  • Make sure you have a Lunduke.Locals.com account (a free account works just fine).

  • Send $190 worth of Bitcoin (or more) to the following address:

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.

Nice and easy.

Once again, thank you. The Lunduke Journal would not be possible without your support.

You rule.

-Lunduke

Read full Article
January 09, 2025
post photo preview
The House of Lunduke BBS
Telnet: BBS.LUNDUKE.COM

The House of Lunduke BBS is a 20 node, Telnet BBS (bbs.lunduke.com) focused on the golden age of DOS BBS gaming -- including TradeWars 2002 and Legend of the Red Dragon.

 

 

The BBS is free to use, & creating an account takes only a moment.  All new users are granted 2 hours of access to all games on the system (more than enough to get in your daily turns of every one of these classic games).

Current games on the BBS:

  • TradeWars 2002 (aka TW2002)
  • Legend of the Red Dragon (aka LORD)
  • Legend of the Red Dragon 2
  • The Pit
  • Exitilus
  • DoorMUD
  • Barren Realms Elite

 

How to Connect

 

Accessing The House of Lunduke BBS is incredibly easy.  Simply point any Telnet client at "bbs.lunduke.com" on port 23 (the default Telnet port).

This means, on many systems, a simple:

telnet bbs.lunduke.com

Will, technically, work.

However, if you want to have the absolute best experience -- and see what BBSing was truly like back in the 1980s and 1990s -- you'll want to use a Telnet client capable of displaying ANSI color... specifically one tuned for BBSes.

The following Telnet clients are all recommended and work well with The House of Lunduke:

Once you have chosen your Telnet client, simply add "bbs.lunduke.com" to your address book and connect.  Or, from within some Telnet clients, you can also type "atdtbbs.lunduke.com" (no spaces).

Fun fact: "ATDT" is a command which tells an old-school modem to "tone dial this number".  The "AT" stands for "Attention", "D" stands for "Dial", and ending T stands for "Tone".  In the old days ATDT would be followed by a phone number... but, since we're connecting via Telnet, we now use a domain.

Or, if you want to get really old-school, it is possible to utilize DOSBox and an era appropriate terminal client (such as Telemate).

 

 

F.A.Q.

 

Q: What software does The House of Lunduke BBS run?

A: The core BBS software is known as Virtual Advanced (a successor to VBBS), a DOS-based BBS package that acheived some popularity during the early 1990s.  All of the games on the system (known as "Door games" in BBS terminology) also run on DOS -- and each is the most popular version (or the last version) of each.  A Telnet server handles incoming telnet connections -- which then interfaces with the DOS-based BBS software, using what is known as a FOSSIL driver.

 

Fun Fact: A FOSSIL driver is a serial interface driver -- which makes it easier to use a standard interface to multiple different communication devices (such as a type of dial-up modem or a Telnet connection).  FOSSIL stands for "Fido Opus SEAdog Standard Interface Layer".  Which is a fun name.

 

Q: What does "20 node" mean?

A: In "ye olden times", BBSes used modems and phone lines.  One person, at a time, could call a BBS on each phone line.  Each of these is a "node".  We are now living in the future -- and using Telnet instead of phone lines -- which means that, in theory, we could have a small mountain of people connecting at the same time.  However.  Since we are using 1980s and 1990s DOS software, jury-rigged to work with the modern Internet, some of those old limitations still apply.  20 nodes were chosen as that makes for an incredibly large BBS system... but not too difficult to manage.

 

Q: Why not use a more modern BBS server?

A: There are several "modern" BBS servers -- with many fancy benefits.  MysticBBS, Synchronet, and others.  The House of Lunduke BBS is not about being modern.  Or fancy.  It is about preserving a snapshot of a high-point in BBS gaming history.

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