sudo apt update \&\& sudo apt install microsoft-edge-stable
Look, a heretic!
Someone put it in AUR: https://aur.archlinux.org/packages/microsoft-edge-stable-bin
Many people have given great suggestions for the most destroying commands, but most result in an immediately borked system. While inconvenient, that doesn’t have a lasting impact on users who have backups.
I propose writing a bash script set up to run daily in cron, which picks a random file in the user’s home directory tree and randomizes just a few bytes of data in the file. The script doesn’t immediately damage the basic OS functionality, and the data degradation is so slow that by the time the user realizes something fishy is going on a lot of their documents, media, and hopefully a few months worth of backups will have been corrupted.
Calm down there Satan.
So basically malware by a sadistic internet troll?
cat bomb_threat.txt | mail [email protected]
Some generative AI is going to swallow this thread and burp it up later
My wife’s job is to train AI to not do that. It’s pretty interesting, actually.
A bad actor doesn’t care what your wife does. :)
I too choose this guys wife
How does she accomplish it?
vim
Everyone else talking about how to shred files or even the BIOS is missing a big leap, yeah. Not just destroying the computer: destroying the person in front of it! And vim is happy to provide. 😅
True, just entering vim on a pc for a user who doesn’t know about vim’s existence is basically a prison sentence. They will literally be trapped in vim hell until they power down their PC.
I once entered vim into a computer. I couldn’t exit. I tried unplugging the computer but vim persisted. I took it to the dump, where I assume vim is still running to this very day.
If you’re just looking for a little fun
echo exit >~/.bashrc
Glorious.
Something I did to someone who needed to know the effects of not locking ones screen when away: alias
ls
toecho 'Error: file not found'
. Took them a good hour to figure out what was wrong with their machine 😅linux rookie here, what’s the command to reverse an alias then? do you just “alias ls ls” to overwrite it?
There’s unalias
You can use unalias, or you can use a backslash in front of an aliased command or surround it in double quotes to ignore the alias temporarily.
Backlash. \ls would get you regular ls. Note that ls already is aliased on some popular distros with some common flags.
If you allow root privileges, there is:
sudo rm -rf --no-preserve-root /
If you want to be malicious:
sudo dd if=/dev/urandom of=/dev/sdX
or
sudo find / -exec shred -u {} \;
Let’s extend a little and really do some damage
for x in /dev/(sd|nvme)*; do dd if=/dev/urandom of=$x bs=1024 & ; done
Now
alias ls=
all that. And throw it in a background process. And actually return the value of ls so it doesn’t look like anything nefarious is going on.I think we can do that faster!
dd if=/dev/urandom bs=1m | tee /dev/(sd|nvme)*
Nice idea!
JFC. That’s terminal.
Yes, you enter that in the terminal
🙃
sudo chmod 000 -R /
is very fun way of braking your system and is not widely known 🙂What does this do? nobody can read any file? would sudo chmod 777 fix it at least to a usable system?
The trick is that you loose access to every file on the system.
chmod
is also a file. Andls
. Andsudo
. You see where it’s going. System will kinda work after this command, but rebooting (which by a coincidence is a common action for “fixing” things) will reveal that system is dead.Yep. You could run chmod again to fix it (from a different OS / rescue USB), but that would leave all the permissions in a messy state - having everything set to 777 is incredibly insecure, and will also likely break many apps/scripts that expect more restrictive permissions. So the only way to fix this properly would be to reinstall your OS/restore from backups.
Can you recover from that?
Worst I can imagine would be something like zeroing your bios using flashrom.
Sometimes EDID eeproms are writable from i2c-dev… And sometimes VRM configuration ports too…
:():;:
That ‘amp;’ does not belong in there, it’s probably either a copy-paste error or a Lemmy-error.
What this does (or would do it it were done correctly) is define a function called “:” (the colon symbol) which recursively calls itself twice, piping the output of one instance to the input of the other, then forks the resulting mess to the background. After defining that fork bomb of a function, it is immediately called once.
It’s a very old trick that existed even on some of the ancient Unix systems that predated Linux. I think there’s some way of defending against using cgroups, but I don’t know how from the top of my head.
I think however you’re accessing Lemmy is rendering it wrong. I see the usual function.
Dunno what you want me to do about it.
dunno what you want me to do about it.
I was going to suggest a fork bomb, but it is recovered easily. Then I thought about inserting a fork bomb into
.profile
, or better, into a boot process script, like:echo ':(){:|:&};:' | sudo tee -a /bin/iptables-apply
That could be pretty nasty. But still, pretty easy to recover from, so not really “destructive.”
Came here for this one. Not the most destructive, but certainly the most elegant.
Everyone is deleting data, but with proper backups that’s not a problem. How about:
curl insert_url_here | sudo bash
This can really mess up your life.
Even if the script isn’t malicious, if the internet drops out halfway the download you might end up with a “rm -r /”, or similar, command.
So many things these days use that install.sh piping stuff, very bad practice.
Ctrl-D
Kills the terminal instantly.
“wipefs -a” instantly removes filesystem signatures. It’s fast, doesn’t actually delete data but is just as effective in most cases where you’re not worried about someone trying to recover it. Much faster than rm on /. As far as the OS is concerned the drive is then empty.
“nvme format” is also fast.
youngsters and their tools… we just used to dd some /dev/zero onto the block device and ^C out of it after a second or two… :D
Mistaking if= and of= when using dd.
After all, it is known as the Dick Destroyer.
Edit: Disk Destroyer, I meant to write “Disk Destroyer”…
Why didn’t they called them from= and to= ? :(
Ouch!
1.- I will start with the infamous
rm-rf /
I don’t think there’s anything shorter or more elegant than this really. When you’re right you’re right.
These days the GNU rm specifically warns you and asks you to confirm before proceeding
dd
Alias ls=“sudo rm -rf / > /dev/null” would be hilarious