Translate

Image of RHCE Red Hat Certified Engineer Linux Study Guide (Exam RH302) (Certification Press)
Image of Modern Operating Systems (3rd Edition)
Image of XSLT 2.0 and XPath 2.0 Programmer's Reference (Programmer to Programmer)
Image of Android Wireless Application Development

Shell Fork Bombs

Fork Bombs have been around in shells since the first Unix shell was written.

Examples of Unix/Linux fork bombs include:

:(){ :|: & };:

$0 & $0 &


The first example is often used by system administrators to test user processes limitations.

Once a successful fork bomb has been activated on a system it may not be possible to resume normal operations on the system without rebooting, as the only solution to a fork bomb is to destroy all instances of it.

Probably the best way to prevent a user invoking a fatal fork bomb on Linux is to add the user to /etc/security/limits.conf file and impose process limitations.

Comments are closed.