Linux's deadliest command doesn't faze Bash on Windows 10

Windows laughs at Linux's deadliest command, the dreaded rm -rf /

You knew it was going to happen: As soon as Linux’s Bash shell hit Windows 10 in yesterday’s Windows Insider preview build, people immediately experimented with rm -rf /, a.k.a. the deadly Linux command that nukes everything stored on your computer as well as everything stored on anything attached to your computer.

Breaking down the command reveals why it’s so deadly:

  • rm tells the system to delete the files.
  • -rf stands for “recursive force,” which tells the system to force-remove all the files and folders inside the location you specify without prompting you—even write-protected ones marked as read-only.
  • Finally, the / location specified in this deadly thread represents the root directory—the genesis of your system.

So if you enter the command on a Linux system, boom! Everything’s deleted. (Though to be fair, many Linux systems issue a warning before executing rm -rf / these days.)

Naturally, it’s one of the first things people tried with Windows 10’s Bash implementation—hopefully inside a virtual machine. But it wouldn’t have mattered because running the command doesn’t fry your system, as Petri first reported (though it does fry Bash).

You can coax Windows 10’s Bash shell into running the command, according to Microsoft’s Scott Hanselman, but it involves jumping through some additional hoops. And if you do that, well, Hanselman sums it up:

If you’re looking for more productive ways to use Bash, be sure to check out the 12 commands every Linux newbie should learn.

Join the newsletter!

Error: Please check your email address.
Rocket to Success - Your 10 Tips for Smarter ERP System Selection

Tags LinuxWindows 10

Keep up with the latest tech news, reviews and previews by subscribing to the Good Gear Guide newsletter.

Brad Chacos

PC World (US online)
Show Comments

Most Popular Reviews

Latest Articles

Resources

PCW Evaluation Team

Ben Ramsden

Sharp PN-40TC1 Huddle Board

Brainstorming, innovation, problem solving, and negotiation have all become much more productive and valuable if people can easily collaborate in real time with minimal friction.

Sarah Ieroianni

Brother QL-820NWB Professional Label Printer

The print quality also does not disappoint, it’s clear, bold, doesn’t smudge and the text is perfectly sized.

Ratchada Dunn

Sharp PN-40TC1 Huddle Board

The Huddle Board’s built in program; Sharp Touch Viewing software allows us to easily manipulate and edit our documents (jpegs and PDFs) all at the same time on the dashboard.

George Khoury

Sharp PN-40TC1 Huddle Board

The biggest perks for me would be that it comes with easy to use and comprehensive programs that make the collaboration process a whole lot more intuitive and organic

David Coyle

Brother PocketJet PJ-773 A4 Portable Thermal Printer

I rate the printer as a 5 out of 5 stars as it has been able to fit seamlessly into my busy and mobile lifestyle.

Kurt Hegetschweiler

Brother PocketJet PJ-773 A4 Portable Thermal Printer

It’s perfect for mobile workers. Just take it out — it’s small enough to sit anywhere — turn it on, load a sheet of paper, and start printing.

Featured Content

Product Launch Showcase

Latest Jobs

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?