Most Deadly Linux Commands

Here are some reasons why you should never log in as root unless you have a specific task.

List topic started by biddit's List biddit
You are viewing the consensus version of this list. Only one person has created a list thus far, thus his or her choices solely determine the contents of this list.
  • 1.

    rm -fr /

    Probably the simplest way to hose your system. It recursively deletes all files from the root of your filesystem.
  • 2.

    dd if=/dev/zero of=/dev/sda

    Copies nothing over the entire contents of your disk.
  • 3.

    ls > /dev/sda

    The > redirects raw output, and in this case, to your hard disk, effectively corrupting and destroying the filesystem. 'ls' is used here, but any command can be used.
  • 4.

    mv /home/* /dev/null

    Moves all the user directories to the great black hole known as /dev/null. (effectively deleting them)
  • 5.

    chmod -R 777 /

    Grants read, write, and execute rights to every file for every user.
  • 6.

    mkfs /dev/sda

    Creates a new filesystem on the target. That is to say that it reformats your hard drive.
  • 7.

    :(){ :|:& };:

    This is a forkbomb. It forks processes until your system grinds to a halt.
List Contributers

Only one person has contributed to this list. Because of this, this community consensus list is comprised solely of their entries. Click the user list icon icon to view that user's list.

Why don't you make your own list?