How to delete entire system using Terminal

How can I delete my entire system using terminal? I know that the beginning is rm, but then what?


As root, you could do:

rm -rf --no-preserve-root /

Normally, we try to avoid these things. :)


Most modern Linux distributions actually disable the ability of removing root by default So to get through this you would use the --no-preserve-rootflag.

The complete code to remove the root directory (/) is

rm -rf --no-preserve-root /

you would need to run this as root though.

Another way of doing this is using dd the command for this is

dd if=/dev/zero of=/dev/sd[x]

where [x] is the drive you want to erase. This rewrites each bit of your drive to 0 which permanently erases everything.