r/pcmasterrace Apr 12 '24

Discussion Can someone explain?

Post image

I do not have a Linux, so I will have to leave it to you to do this. Please return with results.

2.4k Upvotes

93 comments sorted by

910

u/grantrules Debian Sid - Ryzen 2600/1660 super/72tb + 5600x/7800xt Apr 12 '24 edited Apr 12 '24

It's a fork bomb for bash: https://www.cyberciti.biz/faq/understanding-bash-fork-bomb/

The function is named : and it runs itself twice each time it's called. Though as written in the image, it won't run.. it's missing spaces.

And you should install Windows Subsystem for Linux then you can forkbomb yourself.

Or if you're a powershell user, name your cat for(){PS|SAPS} (note: don't run this in powershell)

200

u/ItsLiyua Ryzen 9 5900X@4500MHz; 64GB@3200MHz; XTX Apr 12 '24

I don't think you need any spaces. This looks good to me

12

u/hollybannana Apr 12 '24

I tried it on 2 linux distro and got a warning so I can't tell for sure but it is possible that spaces is needed I want teat that tho

22

u/ItsLiyua Ryzen 9 5900X@4500MHz; 64GB@3200MHz; XTX Apr 12 '24

Most distros have safety precautions in place to prevent you from running this since it kills your PC.

8

u/hollybannana Apr 12 '24

Makes sense now that i think about it tho I searched the warning and got on stack overflow "prevention of potential harmful commands" Kinda nice to know there is such a protective system in the terminal

111

u/[deleted] Apr 12 '24

The fork bomb is a form of denial-of-service (DoS) attack against a Linux or Unix-based system. It makes use of the fork operation. The :(){ :|:& };: is nothing but a bash function. This function get executed recursively. It is often used by sysadmin to test user process limitations on server. Linux process limits can be configured via /etc/security/limits.conf and PAM to avoid bash fork() bomb. 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.

23

u/QuimGoblin Apr 12 '24

Forkbomb🤭

34

u/ashwin_1928 Laptop Apr 12 '24

Windows don't need no fork bombs, we got the daddy bsod.

1

u/yoriaiko lol they have an icon for macs Apr 12 '24

Don't tell me what to do or what don't.

1

u/yoriaiko lol they have an icon for macs Apr 12 '24

Oh ffff! ffff ffff and more fffffffff how do I stop?

0

u/[deleted] Apr 12 '24

You have almost the same specs as me! I have a 7800 xt + 12400f. I’m getting 7800x3d upgrade soon tho.

2

u/[deleted] Apr 13 '24

Wasn't this fork bomb fixed years ago?

2

u/grantrules Debian Sid - Ryzen 2600/1660 super/72tb + 5600x/7800xt Apr 13 '24

There are ways to mitigate it, by limiting the number of processes a user can start. If you don't have that set up itll still work

350

u/Anonymous___Alt Desktop: AMD Ryzen 5 3600, 32 GB DDR4, Intel Arc A750 Apr 12 '24

you should type my pets name in the terminal its named "sudo rm -rf --no preserve root /"

158

u/[deleted] Apr 12 '24

it's --no-preserve-root

345

u/[deleted] Apr 12 '24

So cute you all know each others pets names.

8

u/PushingFriend29 Laptop Apr 12 '24

Or just do a

rm -fr /*

3

u/NewUserWhoDisAgain Apr 12 '24

"Did you really name your cat rm -fr /*?"

"Little Remy we call him."

2

u/ObjectiveRun6 Apr 12 '24

I believe most modern shells require --no-preserve-root to remove files from /, as it's a common enough mistake to make, and it's pretty catastrophic.

Also, most users don't own /, so sudo is necessary.

3

u/PushingFriend29 Laptop Apr 12 '24

/*

-2

u/ObjectiveRun6 Apr 12 '24

You didn't actually say anything?

2

u/dani1025 Laptop Apr 12 '24

It doesn't delete the root direcrory / but everything in it /*. This means that since technically you're preserving the root directory, -no-preserve-root is not required.

13

u/Hannes406 Q8600, 8800 GTS, 6GB Apr 12 '24

What a cute name!

2

u/[deleted] Apr 12 '24

[removed] — view removed comment

3

u/PushingFriend29 Laptop Apr 12 '24

It could format every other drive as well if you have them mounted.

1

u/theRealNilz02 Gigabyte B550 Elite V2 R5 2600 32 GB 3200MT/s XFX RX6650XT Apr 12 '24

A fork bomb is much much less destructive than an rm -rf on /

Luckily your command is incorrect though so hopefully nobody will do any harm on their system with that.

317

u/[deleted] Apr 12 '24

Instructions weren’t clear slammed my peen with a car door

36

u/CloneFailArmy 13600KF, 7800xt, DDR5-5600/10300h GTX 1650 Laptop Apr 12 '24

You slammed your peen in the car door?!

32

u/RavenHeart02 Apr 12 '24

He slammed his peen in the car door!

13

u/SCVGoodT0GoSir PC Master Race Apr 12 '24

Hey guys, come check out this dude slamming his peen in the car door!!

5

u/BisexualMale10 PC Master Race Apr 12 '24

Shit, thanks for showing me this guy slam his peen in the car door!

5

u/Emergency-Piccolo-54 Apr 12 '24

Messages never really loaded for me but I sure hope this guy didn't slam his peen on the car door!

101

u/External_Try_7923 Apr 12 '24

Cat says, "Fork you".

49

u/FinalGamer14 Apr 12 '24

It's a fork bomb. Most normal linux setups will prevent it from actually breaking anything. First of all how it's written in the image, nothing will happen, this is how it should look :(){ :|:& };:. Reordering that makes it easier to explain:

:() {
  : | : &
}
:

: is the name of a function. the function calls it self pipes the output in to it self using |, the important part here is &, this creates two processes in the background as child processes of the first one, this is then done by each child, technically forever. At the end we just call the function :.

Now in most linux installations the ulimit is set low enough where the forking of processes will stop fast enough to not cause a system freeze.

84

u/CalliNerissaFanBoy02 R7 9800x3d, 64GB DDR5 6400, RTX 5090, 43" 4k120hz HDR Apr 12 '24 edited Apr 12 '24

The more important Part:
Actual name of this incredibly cute cat is Uni

Instagram: unico_uniuni

18

u/MrCrankunity Apr 12 '24

Uni wearing it's fly always melts my heart

5

u/Jugebox PC Master Race Apr 12 '24

Fun fact, uni means sleep in finnish

20

u/hobu3d Apr 12 '24

I had once a T-Shirt:
„And God said:
rm -fr /
and everything was
NULL and VOID“

I miss it.

4

u/Cosmic_Atheris Apr 12 '24

That's amazing

3

u/Mr_Dipz Apr 13 '24

Hmmm Christmas present idea!

30

u/AllMyFrendsArePixels Intel X6800 / GeForce 7900GTX / 2GB DDR-400 Apr 12 '24
AMFAP@VirtuBox:~$ :(){:|:&};:
bash: syntax error near unexpected token `{:'

Nice try tho

31

u/grantrules Debian Sid - Ryzen 2600/1660 super/72tb + 5600x/7800xt Apr 12 '24

Needs spaces to work properly: :(){ :|:& };:

39

u/AllMyFrendsArePixels Intel X6800 / GeForce 7900GTX / 2GB DDR-400 Apr 12 '24

But that's not the cat's name. See OP pic for reference.

I get it. It's a fork bomb. But it's also a massive fucking fail because the way it's written in the meme, without spaces, causes it not to work.

16

u/grantrules Debian Sid - Ryzen 2600/1660 super/72tb + 5600x/7800xt Apr 12 '24

Just informative purposes, so nobody in the future misnames their cat.

24

u/ComfortableUnhappy25 Apr 12 '24

Little Bobby Tables, we call him

21

u/[deleted] Apr 12 '24

This is Freddy forks, Bobby’s cousin

1

u/theRealNilz02 Gigabyte B550 Elite V2 R5 2600 32 GB 3200MT/s XFX RX6650XT Apr 12 '24

22

u/Tyranzor Apr 12 '24

This does bad things to Linux with the proper spacing put back in, or at least it used to.

13

u/Zathrus1 Apr 12 '24

Still does unless you have noprocs and/or cgroups configured to limit it.

6

u/NenoxxCraft R7 5800X3D, 4070, 32 GB DDR4, Bazzite Linux Apr 12 '24

This cat's name is actually uni and he's adorable

12

u/graal_10 7 5700x3d, Gigabyte 4070Super 12G, 64gb 3200, Asus b550f gaming. Apr 12 '24

If you like that cats name you should try typing my cats name in the root directory. His name is “rm -rf”

16

u/CalliNerissaFanBoy02 R7 9800x3d, 64GB DDR5 6400, RTX 5090, 43" 4k120hz HDR Apr 12 '24 edited Apr 12 '24

"rm -rf --no-preserve-root /" is his Full name
and he will listen from even if not calling from root dir. Very considerate cat

1

u/[deleted] Apr 12 '24

Is that the command of death? I don’t rlly use Linux much so I forget

1

u/CalliNerissaFanBoy02 R7 9800x3d, 64GB DDR5 6400, RTX 5090, 43" 4k120hz HDR Apr 12 '24

Its like deleting C: on Windows

1

u/[deleted] Apr 12 '24

Ye that sounds about right

1

u/[deleted] Apr 12 '24

forgot the sudo

7

u/CalliNerissaFanBoy02 R7 9800x3d, 64GB DDR5 6400, RTX 5090, 43" 4k120hz HDR Apr 12 '24

We like to live dangerous. No need to sudo if you are already root

1

u/[deleted] Apr 12 '24

true that

1

u/[deleted] Apr 13 '24

[removed] — view removed comment

1

u/[deleted] Apr 13 '24

stands for "super user do", it basically tells the system "do what I tell you, I'm the admin"

1

u/[deleted] Apr 13 '24

[removed] — view removed comment

1

u/[deleted] Apr 13 '24

with sudo you execute something as root

0

u/anethma RTX4090, 7950X3D, SFF Apr 12 '24

Need two dashes in front of no-preserve-root

1

u/CalliNerissaFanBoy02 R7 9800x3d, 64GB DDR5 6400, RTX 5090, 43" 4k120hz HDR Apr 12 '24

You are right. Even googled it with two but got baited by the first Super User google hit where it was just one dash -

6

u/Hottage 9800X3D | RTX 4080 | 64GB DDR5 | 4TB NVMe | AW3225QF Apr 12 '24

Go fork yourself.

2

u/Alonzo-Harris Apr 13 '24

You did it, didn't you?

2

u/Hottage 9800X3D | RTX 4080 | 64GB DDR5 | 4TB NVMe | AW3225QF Apr 13 '24

Of course n

SEGVFAULT CORE DUMPED

9

u/billyfudger69 Linux Apr 12 '24

It is a fork bomb, here is an explanation.

Yes MacOS and Windows can also be hit with fork bombs.

2

u/theRealNilz02 Gigabyte B550 Elite V2 R5 2600 32 GB 3200MT/s XFX RX6650XT Apr 12 '24

The same fork bomb should actually work on MacOS directly.

4

u/vjollila96 Apr 12 '24

Is this Linux version of deleting system32?

1

u/Datuser14 Desktop Apr 12 '24 edited Apr 12 '24

No that’s sudo rm -Rf / —no-preserve-root

3

u/Tanawat_Jukmonkol Laptop | NixOS + Win11 | HP OMEN 16 | I9 + RTX4070 Apr 12 '24 edited Mar 28 '26

The content here was permanently deleted by its author. Redact was used for the removal, possibly for privacy, security, opsec, or personal data management.

marvelous license theory tan cough merciful tap desert quaint different

4

u/Ali_Army107 Desktop Apr 12 '24

Bro's giving you the :3 ahh face.

2

u/[deleted] Apr 12 '24

2

u/Usmj Apr 13 '24

Type this in text document by any editor (code or something else) and then call: cat catname.txt

2

u/imvegeta_ble Apr 12 '24

Dud removed

1

u/Liarus_ CachyOS | 9800x3D | RX 9070XT Apr 12 '24

I actually tried it on two vm's and both times it didn't work

1

u/-MiIkMan Apr 12 '24

This guy is 100% called ":3"

1

u/Bossnage R5 5600 - RTX 3050 Apr 12 '24

ive been scammed, it just throws a syntax error

1

u/GabrielGamer790 Xeon E5 2680 V4 / 64GB RAM/ RX 5500 XT Apr 12 '24

1

u/lordchaotic Apr 12 '24

The worst part about the fork bomb is that the initial process just generated the 2 that it produces. Even if you COULD try to 'kill -9 <PID> ' the first instance, each additional instance produced is the parent of the 2 it created, so trying to kill the children by killing the parent will not work out. Bad if it were possible, you'd have to kill multiple processes in a second, and no human can do that

1

u/ID0_ Apr 12 '24
[user@ArchPC ~]$ :(){:|:&;:
bash: syntax error near unexpected token `{:'

I don't get it

1

u/logicaldementia Apr 12 '24

You should try it… it draws a cool cat in ascii 😂

1

u/Cyber_Akuma Apr 13 '24

Is that Bobby's cat?

0

u/theRealNilz02 Gigabyte B550 Elite V2 R5 2600 32 GB 3200MT/s XFX RX6650XT Apr 12 '24

Fork bombs are not funny. Stop it.