Pawan Bahuguna

Let's Learn and Share
Menu
  • Home
  • Certification Guide
  • Tips
  • Disclaimer
  • Privacy
  • Contact

Home
Linux
I RAN “rm -rf” on Root Filesystem (rm -rf /)
Linux

I RAN “rm -rf” on Root Filesystem (rm -rf /)

Pawan Bahuguna

We keep on listening that there are dangerous commands in Linux/Unix and are advised not to run those commands. One of those deadly command combination in Linux is “rm -rf /“. Though “rm” is a normal Linux command which we use daily to remove files, but when it is used on root filesystem with “-rf” option it becomes destroyer of operating system.

There is nothing much in explaining this article and this article is crystal clear with its title. I am sure you must be knowing about “rm” command. It is used to remove files or directories in Unix / Linux distros.

 

Finally I RAN rm -rf on Root Filesystem

 

Below is the single command which I used to destroy the whole Linux operating system, with its switches or options. I have used -v switch to show what is happening in terminal, otherwise we don’t have any idea what’s going on.

 

rm -rf /

-r: recursive
-f: force
-v: verbose

 

When I first ran “rm -rf /”, Kali Linux gave me an error and ask to use “–no-preserve-root” switch with the rm command.

Kali Linux is a very intelligent operating system and does not allow to run “rm -rfv /” command even by mistake and gave that warning.

Then I ran “rm -rfv –no-preserve-root /” and the command was executed successfully.

Just in few minutes whole filesystem hierarchy was deleted and nothing was visible. Once the whole Kali Linux operating system is down, you will see grub error as below.

error:file '/boot/grub/i386-pc/normal.mod' not found

Entering rescue mode...

grub rescue:

 

So let’s don’t talk anymore and just watch below video. Hope you will like it.

 

 

Note: Do not run this command on production environment.

 

Do let us know what are your views about this video and provide your feedback. Also, do let me know if you have ever tried running “rm -rf /” on any UNIX/Linux distributions. As always, do not forget to share this article and video and do subscribe to my YouTube channel and this blog.

Share
Pinterest
Linkedin
Tweet
Google+
Stumble
Email
Prev Article
Next Article

Related Articles

CentOS7 Download
Linux operating system don’t need any introduction and if you …

CentOS 7 Now Available for Download

RHEL 7 6 5 Common Administrative commands
We all are aware that Red Hat has launched a …

Common Administrative Commands for Red Hat Enterprise Linux 5, 6, & 7

Tags:Fun With Linux Kali Linux Linux Tutorial

8 Comments

  1. Philippe

    I tried it once on a dummy virtual machine to see what will actually happen and guys, did it mess everything up… lol now I know how dangerous it is.
    Never make that mistake on production site (you’re getting fired) and I’d go as far as advising people to type slow when they use #rm -rf on anything.
    Good day! πŸ™‚

    April 9, 2017
    • Pawan Bahuguna

      Thanks Philippe for your advice. It is very dangerous command and your production environment can be blown in just few minutes.

      April 9, 2017
      • Philippe

        If you catch it fast enough with Ctrl+c, you might save the most critical stuffs like certain commands but there’s a great chance the system will still be damaged.
        By the way, thanks for your book. It’s awesome!

        April 10, 2017
        • Pawan Bahuguna

          Yes Philippe, you are right and thanks for appreciating the book. Hope you have already reviewed it on Amazon. πŸ™‚

          April 10, 2017
          • Philippe

            Yes, I did!

            April 10, 2017
          • Pawan Bahuguna

            Thanks a lot buddy and do practice a lot for RHCE. Good luck!

            April 11, 2017
          • Philippe

            Thank you, sir!!

            April 11, 2017
          • Pawan Bahuguna

            Thank you for the review.

            April 12, 2017

Certifications at Discount

> Certified Kubernetes Security Specialist (CKS)
> Certified Kubernetes Application Developer (CKAD)!
> Certified Kubernetes Administrator (CKA)!
> Linux Networking and Administration (LFS211)
> Monitoring Systems and Services with Prometheus (LFS241)
> More at The Linux Foundation

Lets Connect

  • Popular
  • Recent

Free Newsletter

Subscribe NOW!

We don’t spam! Read our privacy policy for more info.

Check your inbox or spam folder to confirm your subscription.

Pawan Bahuguna

Let's Learn and Share
Copyright © 2025 Pawan Bahuguna
Home | Privacy Policy | Disclaimer | Contact