Linux is an excellent operating system- in so many ways. With great excellence comes a great responsibility and that is, how NOT to use your Linux. Following introduces commands are Linux terminal commands, which are used, but not limited to the Linux terminal. In wrong hands these commands can make a bad damage, so never use these examples to harass people. That would make you a dickhead and make me feel that this article was greatly misused.
“It’s not rm -rf what kills files, it’s the sudoer that holds it.”
Following command examples are DANGEROUS and can, and most likely will damage your computer, filesystem or data. Use caution. Most of them will need SUDO or root-user access.
List of dangerous commands are as follows:
rm -rf /
This command example is done using remove command in a very wrong way. It will call remove command using -r and -f parameters which mean recursive directories and their contents (-r) without asking anything and ignoring nonexistent files (-f) which are pointed to the root ( / ) of the filesystem. It other words, it WILL delete the hell out of everything, or at least most of it. Heed my warning.
echo goodbye > /dev/hda (or /dev/sda)
Very convient way to say good by to all. In Linux, storage devices are displayed in /dev/ (devices) directory, where IDE storage as marked as /dev/hda (hdb,hdc,hdd..) and SCSI storage /dev/sda (sdb,sdc,sdd..) and when using > parameter, it states that any output of the given command, in this case echoing text “goodbye”, will write over this text to entire hard disk. You can basically use any command and direct it’s output to the storage device, but as said, it will screw the storage device over and out.
This is the interesting one, and it’s called a fork bomb. What it basically does, is that it will call itself both in foreground (in running terminal) and in background, and every instance keeps repeating the task until, you might already realize it, it has used all the system resources and ends up in crashing the system. This is a really, really nasty thing to do a high-priority system because it will lead to crash. One might be a very nasty troll and even add it to a boot scripts which would give some admin a grey hairs.
mkfs.ext3 /dev/hda (or /dev/sda)
Ladies and gentlemen. Let me introduce to you a fine example of the another partition destroyer. This will, like “echo goodbye” example earlier, f*ck up your file system. Command will mark your storage device with the “NEW” flag, meaning, as it had never been used (or just partition/FS re-created.) so you will lose all the data it has.
dd if=/dev/random of=/dev/hda (or /dev/sda)
This is just me, continuing example how to destroy your storage device and all the data in it. This command will fill up your defined storage device with random data generated from a blocking pseudorandom number generator. It might not recreate Shakespeare but it WILL destroy your device’s content. Well. At least write all over it.
mv / /dev/null
We all love /dev/null don’t we.. You know? The place where everything ends and nothing returns? You don’t? Well, for those with lesser education, /dev/null is a null-device of the Linux, meaning anything, ANYTHING, you throw into it goes away and never returns. with this command, we are simply moving filesystem root ( / ) into the /dev/null. Enough said.
rm -f /usr/bin/sudo;rm -f /bin/su
Following command is a pain in to the ass for any regular Linux user who is not directly using root account (which is the smart thing to do) and uses SUDO (Super-User DO) or SU (Super-User) commands do their more demanding command. Basically it removes sudo and su commands without confirmation and there! No more sudoing. Believe me when I say, it takes some effort to return them– not impossible, but takes time.
There are, of course, more dangerous commands and methods to use, such as tar bomb which means downloading a compressed smaller file, which actually expands when uncompressed into a whackamole huge mega size filling the whole storage device, or disguised rm -rf into a ansi or hexacode, but basically those are not my interest as I wanted to focus on the commands you might run easily on your own system and screw everything up.
As I stated in the beginning of this article, most (all) mentioned commands and their examples above are nothing less than dangerous. Luckily most tricky ones demand super-user rights but that has not never ever stopped stupid / over-confident / crazy people using only root-user access with their Linux operating systems, so please kids, be careful and never, ever, use commands above to screw your enemies systems, unless of course, they really really deserve it.