Bringing a Windows mindset to a GNU/Linux world

I just ran across a level of stupid so off the charts I had to immediately comment on it here lest my inaction unwittingly foster an environment tolerant of such stupidity. Allow me to quote from a post on Linuxforums:

When I say cd’d I mean I used the command cd, to change directory.
So for example say I downloaded and extracted the drivers to the desktop I would open a Konsole window and type:
sudo cd /home/sebmaster/desktop/[folder extracted to]/
(You probably dont need sudo but I have got into the habit of adding it before pretty much everything)

Those of you are familiar with GNU/Linux should see this heaping mound of stupidity for what it is immediately, and will likely find the following explanation superfluous. For the rest of you, here’s a detailed explanation.

There are two distinct nexuses (nexi?) of stupidity inherent in this quote. The first is the notion that sudo, a wrapper program that executes the program passed to it as an argument with root (adminstrator) privileges, will do anything with the change directory command. It won’t. Cd is a shell command; it is not a program. Sudo can’t even find it. The exact error message I get is “sudo: cd: command not found”. And even if cd was a program, using it in this way wouldn’t do anything, since the new working directory would be lost when the sudo subshell terminated. And even if that did work, it still wouldn’t be useful, because there’s no point in setting your working directory to a directory you don’t have access to anyway. You’re still going to need to use sudo with every subsequent command just to get access to those files, so the sudo cp is superfluous; just skip the cd altogether and use a qualified path to the files.

But that’s not even touching on the second (and greater) nexus of stupidity, which is the very-Windows-like mindset that everything should be run as administrator. Saying “You probably dont need sudo but I have got into the habit of adding it before pretty much everything” is like saying “You probably don’t need a live hand grenade but I have got into the habit of carrying one around with me everywhere I go.” Like a live hand grenade, sudo is potentially very dangerous, as the root account has total access to the system (so simple mistakes or security compromises become far worse than they would with mere user account permissions). The mantra to live by is: Never run anything as root unless it is absolutely necessary. As soon as I read that this faithful deliverer-of-the-stupid executes pretty much everything as root out of force of habit, I stood up from my computer, placed my hand over my face, and let out a very long, exasperated sigh. Why doesn’t he just su at the beginning of every terminal session and get it over with?

Oh wait, I probably shouldn’t have said that. He’s probably going to read that last bit, miss all the rest of the content in this post, and think that’s a good idea. “Hey, now I don’t even have to type sudo anymore, because everything I do is always as root!” Yes, even changing directories.

11 Responses to “Bringing a Windows mindset to a GNU/Linux world”

  1. drinian Says:

    Well, this isn’t so much an issue of “Linux” mindset as it is Unix mindset; the differences run much older and deeper than that. I already mentioned The Art of Unix Programming , and I could also bring up the old UNIX-HATERS Handbook, written back before multi-user Windows on the desktop wasn’t even a twinkle in Bill Gates’ eye.

    The fact of the matter is that I don’t think most people can really appreciate the intricacies of even the relatively rudimentary privilege separation in Unix without much time devoted and a certain degree of fastidiousness that most people do not even desire to be capable of. When working with corporate clients’ systems, for instance, I often find them littered with install packages, ignorant of good package management, with security skewed towards non-existent threats while ignoring real ones, and, worst of all, willful ignorance of the Filesystem Hierarchy Standard in favor of internal “standards.” And these are “Certified UNIX Administrators,” as I am reminded in their email signatures.

    Learning how to think in Unix can be very demanding for the average user. I think that a little knowledge can be much more dangerous in Unix than in Windows because of the lack of special-casing and safety nets; one “sudo rm -rf /” and this guy’s toast. This isn’t a criticism of Unix, incidentally. I think that lightweight users who just want IM and email will thrive on Ubuntu as soon as they’re shown the package manager, and I think dedicated Unix-heads are also in good shape. It’s the dabbling “power-users” who are most prone to blowing things up as they mess around with tools they don’t fully understand. The learning curve for someone raised on Windows is much higher because they’ll try to understand the tools in a Windows context.

  2. drinian Says:

    Also, the original poster’s choice of venue betrays an ignorance about the Linux community; I’ve never understood the draw of Linuxforums or similar locations over the much-bigger discussion boards, IRC channels, and bugtrackers of the distributions and applications themselves. I do have a number of trusted people who I draw on outside of these channels, but Linuxforums strikes me as the IT equivalent of Yahoo! Answers.

  3. Cyde Weys Says:

    I can’t say I really know anything about Linuxforums besides the fact that I occasionally see it in Google search results.

  4. Rambo Tribble Says:

    It’s not L/Unix vs. Windows mindsets; it’s consumer vs. technician mindsets. Can you rebuild an automatic transmission? Probably not, you just want to put it in “D” and have the car go. Why get so wound up when a consumer-grade user has a similar expectation of their computer? It is human nature to want everything to be simple and easy. To this user “sudo” is a magic word that makes things work. His/her use of it is a classic example of what a psychologist would term superstitious behavior. Such behavior was first cataloged in working with pigeons in the ’50’x. It is part of the biology of our species.

    One of the shortest paths available to consummate frustration is to fight human nature. I’d suggest you investigate other paths, if frustration is your goal. Many offer better scenery than this one.

  5. William Says:

    That was… remarkably well-put.

    Still, that kind of defeats the entire purpose of having non-root access, which we all recognize as being a major problem from a security standpoint.
    But who I am to talk? I’m currently logged into XP under the default “Administrator” account. Windows makes it too much work to be anything but an admin on my own computer.

  6. drinian Says:

    I agree that was very well-put, although I continue to argue that Windows encourages superstitious behavior much more so than Unix. And I don’t think that this was a “consumer-grade” user. To extend the automotive analogy, he’s more like the bus drivers I saw in Japan who would shut off the engine at every stop light to save fuel; they felt that they had much more knowledge than they did. Consumers don’t do that, but I don’t think there’s too many people out there who are just “consumers.”

    And yes, it is probably easier just to get away from teh stupid than try to fight it head-on. The year that everyone is a Unix command-line master is the same year that everyone in the US gets their income taxes done by the end of February, with plenty of time left before the deadline. Fastidiousness and precision are not in many people’s nature, or are focused in specific areas. Many people would not drive a beat-up car like yours, for instance, even if it does make installing ham radio antennas easier.

    It’s a shame, because I think that if most office workers understood how to program and what exactly the computer can do for them, their jobs would become immensely easier and less repetitious.

  7. Cyde Weys Says:

    drinian: Hey, my car isn’t beat up! (Relatively, for its age, anyway.) I’m being a good environmentalist by not buying a new car until one is necessary. And in the meantime, I get the added bonus of being able to mod it for ham radio without any real care in the world as to affecting the resale value.

    And while I do recognize that using sudo for everything is superstitious, that doesn’t mean it isn’t worth putting in the effort to educate users not to do it. It’s not that hard to understand what sudo does and when it should and shouldn’t be used. It’s a problem of ignorance, not a fundamental lack of ability to understand these things.

    Besides, superstition is a bad thing. At best it causes additional inefficiencies and at worst it can cause demonstrable harm. I won’t dismiss anything as “mere” superstition, because superstition itself is worth fighting against.

  8. William Says:

    Japanese bus drivers: I think that’s a regulation, actually. Every bus I’ve been on has done that at about 75% of lights.

  9. drinian Says:

    Re: Japanese bus drivers, I only saw it happen way out in the boondocks with a few drivers.

  10. Chris Lees Says:

    Rambo Tribble, we’ve got to make sure that users know what’s good practice and what’s bad practice, rather than letting them keep destructive habits. It’s like if your car driver put the gearbox into “1” rather than into “D” – sure, the car will go, but the probability of blowing out the engine is much higher. When I bought my first automatic, my father told me what the “1” and “2” settings are for, in case I need them, and so I know when not to use them.

  11. William Says:

    Re: Re: JP drivers: I live in Kyoto. Is that “boondocks” by your definition?
    Though I’ve only ridden the buses a couple of times. They scare me because I don’t know where any of the stops are and I can’t find a map that shows where they are, just a diagram showing what order they’re in. I mean, at least a lot of them have useful names like “In front of Hospital West Ninjaburg”, but other times it’s like “Where am I?”