This article refers to some of the Linux commands you should never run on your system as they might prove to be DEADLY for your Linux systems. So before I proceed, I would like to point out that this article is written for information only to let the readers know that executing any of the following commands is to be avoided. All commands mentioned here can have serious repercussions for your system & its data.

Also Read: Useful Linux Commands that you should know

Recommended Read: Linux Commands for Beginners (Part 1)

So let’s start the list of Linux commands you should never run & might I say again that you proceed with caution,


Linux commands you should never run


1- Format System Disk

Linux Administrator uses this command very often to format and assign a file system to a newly created disk partition. But when used irresponsibly, this can also format the disk with data on it,

$ mkfs.ext4 /dev/sda

So when using this command, make sure that the intended disk partition has been selected.


2- Delete /etc or /boot directories

/etc holds all the configuration files for the system & /boot holds all kernel, InitRD & GRUB related files, files that are required for system bootup. To delete any of these folders & your system will not boot up,

$ rm -rf /etc

$ rm -rf /boot

Another way to remove configuration files from your system & leave your system irrecoverable is to use the following command,

$ find / -iname "*.conf" -exec rm -rf {} \;

This will find & remove all the files ending with .conf (configuration files).


3- Delete the entire file system

Most of you might know of this command & it goes like

$ rm -rf /

This will delete the entire file system from your server, deleting every byte of data on disk.


4- Fork Bomb

Now, this command creates copies of itself endlessly & within no time will all your system’s memory, CPU & thus will cause the system to crash,

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

This can also lead to disk corruption.


5- Fill disk with random data

$ dd if=/dev/urandom of=/dev/sda

This will fill the disk with random data. Another variant of this command overwrites the disk several times over the original data,

$ shred /dev/sda

This command is actually a useful tool, especially when you are discarding off the old disk & would not want data from the old disk to fall into wrong hands (& another way I learned from movies is, you can also drill some holes into the drives).


6- File permissions havocs

All the above commands deal with the removal or overwriting of data. But there are ways to render your system unusable using the file permissions. The first command is,

$ chmod -Rv 000 /

This command will remove all the file permissions of all the files or folders on the system & since nobody will have access to files & folders, nobody can access those. & this leads to another way to writing the above command,

$ chown -R nobody:nobody /

This will also accomplish the same output as the first one. Now the second file permission command is actually the opposite of the first one,

$ chmod -R 777 /

This will change permissions for all the files & folders to be world-writable. & I am sure you can think of what will happen in such a scenario.


So this was our list of Linux commands that you should never run on your system. Please feel free to send in any questions or queries you have regarding this article using the comment box below.

If you think we have helped you or just want to support us, please consider these:-

Connect to us: Facebook | Twitter

Linux TechLab is thankful for your continued support.