Should Ubuntu prevent “sudo rm -rf /” command ?

There have been talks over the ubuntuforums, regarding a user posts “sudo rm -rf /” command on “Absolute Beginner Talk” board, which results in deletion of the whole root directory of a Linux operating system (Ubuntu included).

Was the user out of his line when he’s posted such command on a beginners forum? Absolutely.

Exercise Caution When Running sudo
Users should exercise caution when running command with root privilege (sudo) . I pity to those who unknowingly execute the command and completely destroy their operating system. Its a truly lame attempt to humor oneself at the expense of others losing their precious data.

It is not a bug in coreutils, it is not a bug at all
But the lamest part is, somebody took the time to file a bug report regarding “sudo rm -rf /” on Launchpad.

There’s nothing wrong with that command, it did what it supposed to do, and that is the behavior expected from a Unix/Linux based system, there’s nothing wrong with that command at all.

Besides, if somebody compromised your system and got into your root accout, you are screwed anyway as there are a lot of other command which has the same (if not worse) devastating effect as “sudo rm -rf”, a fact that has been acknowledge on the same bug report

What do you think ?
I don’t know about you, but I felt more comfortable educating newbie users to be more careful when running command with root privilege than supporting an act which seems to ‘cripple’ the operating system itself. Trust me, this is not going to help newbie users.

p/s: I’m in complete agreement with this guy, this is not a bug, stop pampering newbies or else you’d ruin each and every of them!

8 Replies to “Should Ubuntu prevent “sudo rm -rf /” command ?”

  1. Newbies shouldn’t be messing around on the command line in the first place. Stop telling them to copy and paste commands when there’s a perfectly good user interface, and they won’t get into the habit of entering stupid commands that destroy their system.

  2. Hi, Attention pleace!!! My name is Riza, I m from Indonesia. Im very need a cd or dvd linux debian 4. pleace send to my address :
    Country : Indonesia
    street Jl Cihanjuang Rt 02 rw 19 no 105 Gg H Safei Kelurahan Cibabat Kecamatan Cimahi Utara
    City : Cimahi
    code post ; 40513
    Province : jawa barat
    Indonesia.
    thanks for all attention.

  3. Hi, Attention pleace!!! My name is Riza, I m from Indonesia. Im very need a cd or dvd linux debian 4. pleace send to my address :
    Country : Indonesia
    street Jl Cihanjuang Rt 02 rw 19 no 105 Gg H Safei Kelurahan Cibabat Kecamatan Cimahi Utara
    City : Cimahi
    Province : jawa barat
    Indonesia.
    thanks for all attention.

  4. I had to be agreed with all of you. As for me, the best solution for this problem is to show warning when user implement the “rm -rf /” command before executing.

    That’s the best way to prevent newbie user from unintendedly deleting all of the files by committing rm -rf command. But totally banned this command is not the best solution.

  5. I don’t totally agree with Benjamin, I am a new Ubuntu user and I have (many time) copied and pasted commands off a blog and onto a console. Because I am learning, a warning when typing “su” or “sudo” wouldn’t be enough, I’d rather have a warning when I type “sudo rm -rf /” so I would know what it really does and be aware of the danger of it.

    I hope you understand my point of view. Bye.

    PS: great blog, by the way.

  6. Funny ;)

    Year this is windows style to protect users from “them self”.

    An linux system like ubuntu, which is optimized for end-users, should in my opinion prevent users from stupid moves in UI area. A console is really not made for end-users, least of all sudo. The should use UI tools.

    Best would be to show a clear warning when opening a console about the damage he can make. Also when calling sudo and su. Also implementing a confirmation in these tools would be nice (a conf-flag which activates/deactivates this).

    It’s maybe an idee to on end-user os’s to protect the very, very important files with “chattr i” (prevent from modifying, renaming, deleting also from superuser).

    Thanks for your blog.

    Best regards,
    Benjamin Schmidt
    schmidi2 (I hate spam) directbox.com

Comments are closed.