Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Anyone understand the following code , running in bash ?

:(){ :|:& };:

It seems to be a "fork" bomb on Linux.

share|improve this question
up vote 16 down vote accepted

It's not that difficult to decipher in fact.

This piece of code just defines a function named : which calls two instances of itself in a pipeline: :|:&. After the definition an instance of this function is started.

This leads to a fast increasing number of subshell processes. Unprotected systems (systems without a process number limit per user) will be severely affected by such fork bombs since legitimate processes will quickly be outnumbered and thus deprived of most CPU resources.

share|improve this answer
Which OS is not protected against this? – Ali Dec 25 '11 at 22:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.