The fork bomb is a form of denial-of-service (DoS) attack against a Linux based system. It makes use of the fork operation.
:(){ :|:& };: is nothing but a bash function. This function get executed recursively. It is often used by sys admin to test user process limitations. Linux process limits can be configured via /etc/security/limits.conf and PAM.
Once a successful fork bomb has been activated in a system it may not be possible to resume normal operation without rebooting the system as the only solution to a fork bomb is to destroy all instances of it.
Command for Shell:
:(){ :|:& };:
Or you can run this command via PHP
<?php
while(1)
pcntl_fork();
?>
WARNING! These examples may crash your computer if executed.