Deadly Linux Commands

terminal logo

In every society there is always the good and the bad. The bad are working day in day out to harm the works of the good. But the the bad always make the good move up higher since the good is will never allow them to catch up.

What I am simple trying to say is there are people who aim to disrupt others, especially newbies and send them in the wrong direction. This then reduces the quest in these newbies for something.

I am going to show a few commands as a newbie or ANYONE should never run. These commands are mostly found in forums where a lot of newbies are seeking for help and other online websites targeted at Linux users.

WARNING: Some of these commands SHOULD NOT be run on a production system. You can try it on an OLD device which is of no importance or in a virtual machine if you are curious.

mkfs.ext3 /dev/sda

The command above will format or erase all data from the device named after the mkfs command.

mv ~ /dev/null 

This is going to erase everything from your root directory since /dev/null is not a valid directory.

:(){:|:&};:

This is known as the fork bomb command. It does not destroy or harm your system. Once you run this, it only freezes the computer and you will have to warm reboot (from the power button). Read more about fork bomb on Wikipedia.

rm -fr /

This is the simplest and well known by most people. It recursively deletes all files from the root.

mv /home/* /dev/null

This moves all the user directories in the home directory to an unknown location /dev/null meaning everything in /home directory is deleted.

mv /home/myhome/* /dev/null

This is just the same as mv /home/* /dev/null but it is limited to the specified user’s home directory. In this case myhome.

chmod -R 777 /

This won’t show any physical effect when run, but for security sake it internally grants read, write and execute rights on every file to every user on that system.

This is just a few deadly commands. I know there will be more out there. Kindly leave yours in the comment box below with a little description of what the command will do.