What will happen after using the fork bomb command?
1 Answer
Depending on the system you might get an error message such as:
No command 'fork' found, did you mean:
Command 'forg' from package 'forg' (universe)
Command 'gfork' from package 'globus-gfork-progs' (universe)
Command 'pork' from package 'pork' (universe)
Command 'forw' from package 'nmh' (universe)
Command 'forw' from package 'mailutils-mh' (universe)
On a more serious note: there's no 'fork bomb' command on Linux. A fork bomb is a program that spawns copies of itself which spawn copies of themselves etc.
The easiest way to make one is probably one of the bash forms:
E.g. (from the linked article):
:(){ :|:& };:
or
bomb() { bomb | bomb& }; bomb
or
bomb() { bomb & bomb; }; bomb
(:
is just a possible function name in bash, and the pipe doesn't really do anything here).
Unless you have some resource limits sets on the maximum number of processes that Linux will allow your user to run, it'll freeze your computer. You can set these limits with sudo -e /etc/security/limits.conf
.