TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Alias CD=“:(){:|:& };:”

3 pointsby Crazyontapover 5 years ago
It’s a fork bomb. It creates and calls a function called : that calls itself and pipes the output to itself in the background.<p>Properly indented and commented, it would look something like:<p><pre><code> :() # create a function called &quot;:&quot; with no arguments { # start the function : | : &amp; # call &quot;:&quot;, pipe the output to another invocation of &quot;:&quot;, and run in the background }; # end the function : </code></pre> P.S. Don&#x27;t try this at home

1 comment

LinuxBenderover 5 years ago
You might suggest folks make this a learning exercise in pam or systemd cgroup limits to protect against fork-bombs [1] Code bugs can accidentally introduce the same condition. A starting point for cgroup limits and pam limits would be ServerFault [2]<p>It is a common misconception that today people can just &quot;shoot a vm &#x2F; container in the head&quot; to solve all problems, but if your problem is buggy code then the new VM &#x2F; container will crash the moment the code executes. Diagnosing and resolving quickly gets harder without system limits in place.<p>[1] - <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Fork_bomb" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Fork_bomb</a><p>[2] - <a href="https:&#x2F;&#x2F;serverfault.com&#x2F;search?q=cgroup+limits" rel="nofollow">https:&#x2F;&#x2F;serverfault.com&#x2F;search?q=cgroup+limits</a>