cross-posted from: https://lemmy.dbzer0.com/post/14479799

Linux Best Practices

You are viewing a single thread.
View all comments
1 point

Every time this gets reposted, I like to reply with this:

:(){:|:&};:

Run it if you dare lol

permalink
report
reply
1 point

Extra room heater, how thoughtful of you

permalink
report
parent
reply
1 point
*

I don’t know what that is, but it feels to me like it might be a fork bomb.

Edit: Yep, fork bomb.

permalink
report
parent
reply
1 point
*

Because I didn’t know what a fork bomb was:

a fork bomb is a denial-of-service (DoS) attack wherein a process continually replicates itself to deplete available system resources, slowing down or crashing the system due to resource starvation.

[…]

A classic example of a fork bomb is one written in Unix shell :(){ :|:& };:, possibly dating back to 1999, which can be more easily understood as

fork() fork fork & fork

> 
> In it, a function is defined (fork()) as calling itself (fork), then piping (|) its result into itself, all in a background job (&).
> 
> The code using a colon `:` as the function name is not valid in a shell as defined by POSIX, which only permits alphanumeric characters and underscores in function names. However, its usage is allowed in GNU Bash as an extension.

[Wikipedia](https://en.wikipedia.org/wiki/Fork_bomb)
permalink
report
parent
reply
1 point

Why my cpu making so much noise?

permalink
report
parent
reply
1 point

it’s a regex loop

permalink
report
parent
reply
1 point

It’s a workout for your CPU. It will make it grow big and strong.

permalink
report
parent
reply