Pular para o conteúdo principal

Fork Bomb Simulator

Visualize how the infamous :(){ :|:& };: fork bomb works. Watch processes multiply exponentially, exhaust system resources, and learn how to protect against it with ulimit, cgroups, and systemd.

Categoria: Security

O que você vai aprender

  • Understand how fork bombs create exponential process growth
  • See how resource exhaustion leads to system crashes
  • Learn to prevent fork bombs with ulimit, cgroups, and systemd

Tópicos abordados: linux, bash, security, processes, educational, interactive

// simulador

Fork Bomb Simulator

Visualize how the infamous :(){ :|:& };: fork bomb works. Watch processes multiply exponentially, exhaust system resources, and learn how to protect against it with ulimit, cgroups, and systemd.

Fork Bomb Simulator

Visualize how the infamous fork bomb works and why it crashes systems in seconds

How the Fork Bomb Works
:(){ :|:& };:

Hover over each part to see what it does. The function calls itself twice, piping to a background copy - exponential growth.

Press Start to unleash the fork bomb

Process Log
$ waiting...
Controls
System Resources
Processes0.0 / 512
CPU0.0% / 100%
Memory0.0MB / 256MB
Protection
Why Fork Bombs Are Dangerous

Exponential Growth

Each process spawns 2 more. After 10 iterations: 1,024 processes. After 20: over 1 million. Most systems hit their PID limit well before that.

Resource Exhaustion

Every process consumes CPU time, memory, and a process table entry. The kernel scheduler gets overwhelmed trying to context-switch between thousands of processes.

Prevention

Set process limits with ulimit -u, use cgroups, or configure TasksMax in systemd unit files. Most modern distros set sane defaults.

Experimente também

Sponsored
Carbon Ads
$ cd /games
// compartilhar