#...R@...<..# You miss the sewer rat! The sewer rat bites!

10 Reasons Why the Command Line is More User-Friendly than the Desktop

Date/Time Permalink: 11/24/07 08:00:38 am
Category: LINKS and Lists

I aim all of these not just at Linux, BSD, and Unix-alikes, but at every computer system ever. Nor do I say all of this as a power-using geek, but to apply it to every computer user everywhere.

1. Keying is faster than mousing.
You might argue this point, and if you do, I'd just point out "Why are there keyboard shortcuts on most menu entries in a GUI?" And why are they called "shortcuts"? Because using a mouse to do something is the long way to do it, each and every time.

2. It's easier to both give and get help.
Nearly every Debian system has synaptic, and I'll bet most people use it. Yet even amongst synaptic users, they'll still answer questions with an "apt-get" statement. It doesn't matter if you use apt-get or synaptic; it's still more efficient to use the command expression behind the GUI action to answer questions online. You can interpret the answer into the GUI tool of your choice.
Ever seen somebody answer a question that has no command-line answer? "Go here, double-click that, click this pull-down, click the arrow, click 'yes', click 'edit', double-click this, that, highlight this..." And this applies on Windows as well; even there it's easier to define an action in DOS commands than it is to describe mouse actions.

This is why our mail is addressed to our house, instead of having instructions to the postman: "Go down main street, turn left, go to spruce street, turn right, go to the eighth building on the right, go up the stairs...".

3. Repetitive stress injury comes from the mouse, not the keyboard.
Do something that uses the keyboard for awhile, then do something that uses the mouse for awhile. How do your hands feel? I especially notice that when I play a game like Diablo or Starcraft, my right hand is cramping terribly after a few hours. But I can play Nethack all day and not feel any pain at all. It stands to reason that if you filter the work of both hands and ten fingers through one wrist and three fingers, you'll have more repetitive motion stress.

4. Commands are standard where GUIs are not.
How do I find a word in a document using a GUI? Do I click "edit - find and replace"? Do I click "view - find"? Do I click "find - search page"? Does the dialog pop up, or does it pop in from the side, or does it show up in a bar at the bottom? Do I have to click close afterwards, or will it close itself? Is the 'find' dialog separate from the 'replace' dialog, or are they combined? Does the dialog on the program understand a regular expression? It all depends on which program you're using - and often which version. And - again, no matter what platform - there's a dozen possible GUI tools to do the same thing with complete feature overlap. Which one do you have available?

How do I find a word in a document using a command line? Grep! I learned grep once in 1998 and haven't had to open the man page since. I'll still be able to use grep 20 years from now. Every Unix-based system has it, even Macs and Windows has it available, and it's always the same from platform to platform.

5. Commands are more powerful.
I don't care how well-designed the GUI is, there's always something you need to do that they forgot to put in a menu item for. But commands can be adapted to many purposes. Especially when you have to do the same action many times. Go ahead, resize a bunch of images to thumbnails in your GUI tool; you'll be working all day while I can type out an Image Magick incantation in one minute and go take a nap while it does it all automatically.

How about editing a document where you need to change all instances of something, except where a special case is true? Unzip a stack of downloaded files, rename them all to a specific scheme, and move them all to different directories? The GUI is good only for limited-use cases and specific actions, but it only takes you that far.

6. You can automate commands.
Really, you only have to learn each command once. Then, no matter how complex, you can save it in a shell script, run it from a menu item, execute it from one key-press, or even give it to cron to perform automatically. There is no computing job on Heaven or Earth that cannot be reduced to a single motion, given a proper scripting environment.

7. Commands are easier to remember than clicks.
Face it, our brains handle words better than they handle spacial sequences of motions. How many times have you tried to show somebody else how to perform a mouse task, only to realize that without sitting in front of the machine doing it yourself, you can't remember how it goes? Learn a command and it's yours for life.

8. GUIs are always changing.
Everybody wants to re-invent the widget set, patent the scroll wheel, re-think the dialog, put their own stamp on the GUI environment. Bring up GUI design, and there's a flame war all over the place about simple things like where a menu should go and whether to use a spin-box or a combo-box. Commands have been performed the same way since the keyboard was invented, end of story.

9. Commands are more error-safe.
All I ever hear is how you can accidentally type "rm -rf ./*" or "del *.*" in the wrong place and wipe out your file system, but look at practical experience. How many times have any of us actually done that? Now, how many times have you clicked 'yes' or 'allow' to the wrong dialog, clicked the wrong button and closed a window when you meant to minimize it, opened the wrong file in a dialog, selected the wrong action in a menu, had to make three tries to drag a selection box around a group of files, dragged and dropped a folder to the wrong place... the list goes on and on. Mousing takes intense co-ordination and concentration to hit a target a few pixels wide, and in the event of a mistake the wrong action is always performed instantly.

A command line does not fire off until you hit enter. So you can read it after you've typed it to be sure it's what you want to do. You can edit it before you execute it. And your brain is actually engaged in the task, instead of focusing on performing millimeter-precise actions with a few muscles in one hand.

10. You have to type to use a computer anyway.
You can get quite far on a computer without a mouse, as long as the programs are set up to accept keystroke commands. But try this: unplug the keyboard and hide it. Now, how far did you get using the computer? How can you IM, email, edit, comment, name files? No matter how much you love your GUI interface, you still spend the bulk of your time using a keyboard.

a meaningless but interesting graphic

UPDATE: Normally, I don't comment on who links to what. But seeing as how this post has gotten a lot of attention, I figured I'd mention something. First, while I'm here, as always, thank you all for your interesting feedback - even if you disagree with me!

And second, I noticed a few hits coming from this page, by one Dr. Bennet (Comp Sci) at Mississippi College. Meh, it's only worth half a toot on the horn-tooting scale, but I was kind of encouraged to see that a computer science professor found my incoherent babble worth linking to.

While I'm at it; hello, StumbleUpon! And hello, hello, hello! Wow, this post is really popular on Stumble. Thanks for the love!

While you're here, Stumblers, did you know I also do a webcomic? Because not many of you seem to know... :) hint hint.

UPDATE Almost two years later, I see Bruce Byfield agrees with me. Hi, Bruce! Welcome to the Gadfly Table!

Update French translation

Update Somebody else gets it. This is what it's like being me. The post you now read was first printed in 2007. I got smeared all over the web for it. Five years later, people quietly come to the same conclusion one by one.

Follow me on Twitter for an update every time this blog gets a post.
Stumble it Reddit this share on Facebook

suddenly the moon