Try it here
Linux/UNIX Command avoid to run

Linux commands you should never run on your system


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 are to be avoided. All commands mentioned here can have serious repercussions for your system & its data.

  1. Format System Disk

    Linux Administrator uses this command very often to format and an 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. So 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 to 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 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.

  6. File permissions havocs

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

    $ chmod -Rv 000 /

    This command will remove all the file permissions of the all the files or folder 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 first one,

    $ chmod -R 777 /

    This will change permissions for all the files & folders to be world writable and 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.

Writer profile pic

Aditya on Oct 13, 2015 at 12:04 am

This article is contributed by Aditya. If you like and would like to contribute, you can write your article here or mail your article to . See your article appearing on the main page and help others to learn.

Post Comment

Comments( 0)


Forgot Password

Please enter your email address below and we will send you information to change your password.