Generally, don’t just copy paste things you find online.
Something else to be aware of and stay away from is “rm -rf /” which will delete everything on your computer, including your operating system. Naturally this will crash the computer and you will not be able to start it again.
(You should be able to boot from a usb stick though.)
@BaardFigur My dude, I understand and celebrate the memes, but please understand that linux first time using is a sensitve period in people’s lives and the reach of modern social media means there is some x% of users who will have a bad time, because they saw that meme and took it seriously.
It’s a fork bomb. Specifically it’s a piece of code that recursively calls itself and then it calls itself to run the code.
Thank goodness it did not work, but please do not actually run code like this!! Do your best to figure out what the code is doing before you attempt to run it!
while this doesn’t work on many modern systems due to a variety of changes since this was widely disseminated, I still like this one and the batch file method of %0|%0, as they are examples of elegant, efficient code on their respective default command line interpreters.
Is a fork bomb, it starts a process that starts two more processes, which each start two more processes, which each start two more processes, which each start two more processes…
And eventually the computer locks up plus it’s hard to kill since the PIDs change constantly.
Its creating a function named : that spawns two copies of : then calls that function to start the duplicating code or forks. For that, its called a fork bomb.
Fork bombs are things that infinitely spawn new forks, until the system crashes. Its an infinite ‘if true, spawn new instance’ loop that only stops when the system gets a hard reset.
So it creates a function, a, which what it does is it calls itself and pipes its output to itself (the a | a). The ampersand means that this will run entirely in the background. Then, to initiate things, the command calls a (in the last line)
So, there will be exponentially be many recursive calls to a, which will eventually deplete your stack and set your pc on fire
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmerhumor@lemmy.ml
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
Posts must be relevant to programming, programmers, or computer science.
No NSFW content.
Jokes must be in good taste. No hate speech, bigotry, etc.
I use fish. This doesn’t work.
Probably for the best, cats eat fish
I tried but got an error:
Is it expected ? Did I type something wrong ? I’m confused…
It means you have a virus
I know a guy that can fix it if you send me your ssh keys
Both of them?
@wgs
Generally, don’t just copy paste things you find online.
Something else to be aware of and stay away from is “rm -rf /” which will delete everything on your computer, including your operating system. Naturally this will crash the computer and you will not be able to start it again.
(You should be able to boot from a usb stick though.)
deleted by creator
@BaardFigur My dude, I understand and celebrate the memes, but please understand that linux first time using is a sensitve period in people’s lives and the reach of modern social media means there is some x% of users who will have a bad time, because they saw that meme and took it seriously.
It’s a statistical guarantee.
It is also a fantastic learning experience
Always read mails really fast
sudo rm -rf / --no-preserve-root
and your password to delete the french language pack :3
I just tried your command and it yields a lot of
Permission denied
. Is it expected or your command is incomplete ?@wgs I really hope you’re trolling. Don’t do that.
Yes, this is expected and means the regular safeties are working. Don’t turn those off please.
Nevermind I figured it out, you gotta use
sudo
for it to work properly !Lies, if you actually did that you would know you need the --no-preserve-root flag
sudo cat /dev/urandom > /dev/sda*
it does not work, it says
permission denied
. Is there anything I should do ?Not with busybox’s
rm
🤘It’s a fork bomb. Specifically it’s a piece of code that recursively calls itself and then it calls itself to run the code.
Thank goodness it did not work, but please do not actually run code like this!! Do your best to figure out what the code is doing before you attempt to run it!
Nevermind I figured what went wrong, I mistyped it initially ! It would have been much easier to copy paste it if it wasn’t a picture…
Fun fact, the command displays a nice cat picture in ASCII :)
Edit: screenshot
Stop doxxing the cat
Better cat version:
🐈(){🐈|🐈&}
you are missing ;🐈 at the end
deleted by creator
🍴💣
🍴💣 🍴💣
🍴💣🍴💣🍴💣🍴💣
🍴💣🍴💣🍴💣🍴💣🍴💣🍴💣🍴💣🍴💣
spoiler
https://www.bing.com/images/create/an-astronomy-picture-of-a-star-exploding-into-a-su/1-65d4ba7cbb804bb9b1d370d59152a572?id=y2Zox36rFxcSZPb8wDuKJw%3D%3D&view=detailv2&idpp=genimg&thId=OIG3.STW8YxXrqKZJeEtr01M0&FORM=GCRIDP&mode=overlay
Fork and knife explosive?! 😱
Silverware incindiary!?! ☠️
/etc/security/limits.conf
exists …Then remove that for appropriate animal care! Do you want the cat to starve?
Don’t worry, the limit is set large enough. No cat will starve on THIS machine.
You should try typing his sister’s name in first,
sudo sh -c “>/etc/security/limits.conf”
alias cat=":(){:|:&};:
, good kittyThen how will i
cat file | grep ...
?grep file ...
Useless use of 🐈
$(which cat) file | grep meow
*
alias cat=":(){:|:&};:
Tell your instance to update to 0.19.
&ersand;
fork bomb can get the fork over it
Fork bomb is actually a pretty fantastic cat name
while this doesn’t work on many modern systems due to a variety of changes since this was widely disseminated, I still like this one and the batch file method of %0|%0, as they are examples of elegant, efficient code on their respective default command line interpreters.
ELI5?
It’s a fork bomb. It exponentially forks processes in the background in an attempt to consume all CPU cycles.
https://www.youtube.com/watch?v=nB_s79lHSVs
Just a sentence, please kind sir, not a video?
Is a fork bomb, it starts a process that starts two more processes, which each start two more processes, which each start two more processes, which each start two more processes…
And eventually the computer locks up plus it’s hard to kill since the PIDs change constantly.
https://en.wikipedia.org/wiki/Fork_bomb
Self-replicating program, malicious
Maybe he thought the topic was interesting and wanted to share more details with us? I appreciate the video.
Its creating a function named : that spawns two copies of : then calls that function to start the duplicating code or forks. For that, its called a fork bomb.
It also backgrounds the process with &
Fork bombs are things that infinitely spawn new forks, until the system crashes. Its an infinite ‘if true, spawn new instance’ loop that only stops when the system gets a hard reset.
Replace “:” with “a” you get
Reformatting
So it creates a function, a, which what it does is it calls itself and pipes its output to itself (the a | a). The ampersand means that this will run entirely in the background. Then, to initiate things, the command calls a (in the last line)
So, there will be exponentially be many recursive calls to a, which will eventually deplete your stack and set your pc on fire
I always wonder, does it really need the pipe? Why not just :&:& ?
Use `` to disable text formatting,
it's intended for code but it can be used for anything where formatting shouldn't be considered
This is why I should not be allowed to use Linux
on windows a forkbomb is literally %0|%0 iirc
How does that work?
%0 means your current command iirc so it just reexecutes itself piping its own output to the new instances
Please I do not need this information oh god what do I do now?
find your nearest school pc with like 8g ram
Did you just… Write 8g ram, implying it’s an amount small enough to belong on a school pc?
most linux distros from android to alpine can be and often are configured to limit the amount of forks a user can spawn
This is made extra humorous thanks to the escape that my Lemmy client adds to the post title. & to &
Hey, now that’s funny. My cat is named
sudo ulimit - u 31677
I have a hunch the two wouldn’t get along.