Ask coding questions

← Back to all posts
What does this fork bomb do. I mean, really?
[deleted]

I understand the basic concept of a fork bomb. A function that continues to replicate itself and use up a system's resources. I've heard that :(){ :|: & };: is bash code for a Linux fork bomb. Is this true? If so, does it work on Windows and macOS? And, lastly, if not, is there a way to make a fork bomb that works on all platforms?

Answered by SixBeeps [earned 5 cycles]
View Answer
Comments
hotnewtop
SixBeeps

What does this fork bomb do

There are multiple blog posts explaining it online. A Google search might help you.

does it work on Windows and macOS?

If you're doing it from a Bash shell, yes. EDIT: Accidentally verified this using Git Bash on Windows.

The repl does… uhh… nothing?

Replit's smarter than that and it will prevent you from forkbombing.

[deleted]

TYSM, @SixBeeps! This was very helpful. PS cool markdown.

[deleted]

The repl does… uhh… nothing?