A loose series of thoughts and venting on Linux, computers in general and their (ab)users.
Thoughts about the command line
Posted 03-29-2009 at 02:36 AM by bitpicker
Tags cli, command line, gui
The following started out as a comment to this blog entry by Carla Schroder on linuxtoday.com. But it quickly became too long so I decided to simply post it here.
Any interface is a metaphor for what you're really doing: shifting zeroes and ones around. Absolutely everything you ever do on the computer is just a metaphor, whether it's using a GUI, the CLI or even programming.
And like language metaphors, different metaphors are useful in different contexts and apply to different ways of thinking and expressing your intentions. It's pretty useless to discuss which metaphor is more intuitive than the other because there is no objective, true-for-all answer. People don't all think or learn alike, why should they agree about what is intuitive? Even among GUIs alone you will find people who disagree about which GUI is easier to use, and they all have valid arguments because in the end what decides truth for them is their individual perception.
I have been using Linux since 2003. I used to know my way around the DOS command line as I was using that system when Windows was still a separate GUI interface for it and sold as such. I never knew that fear of the command line in Linux although I realized very quickly that it was many magnitudes more complex than the DOS one. I use it when I need it, but I wouldn't say I'm a command line 'guru' or any Linux guru at all, for that matter.
On the CLI I prefer to use such programs as mc or htop to the actual commands because well, I find that commands such as chmod are not my way of doing things; I use mc instead. But I do realize that expending the effort of actually memorizing the chmod syntax would speed up the process if I had to do it often, which I don't. But that's just me.
Why do I think that mc is a better solution for me than using a graphical file manager? Well, for example, when I delete something in mc I know it is deleted. When I delete something in the GUI it usually goes to the trash can. So to delete files from a USB stick I have to delete them on the stick and then empty the trash can because while the GUI tells me they are gone they actually still reside on the stick and I just can't see them. Not my definition of intuitive.
On the other hand the graphical manager comes in handy when I browse image collections because it can give me thumbnail previews. I don't like programs which are specifically geared towards image collections because they tend to hide where the images actually are. I want to deal with paths and folders (one metaphor) and not collections of images grouped together by the software but unrecognizable to anything else - that's just not helpful for me.
So what it all boils down to is that you use the metaphors you're ok with. And I believe that choice is essential: it is true that most computer users won't actually need the CLI, but knowing the basics of it is as useful as knowing a bit of first aid in a case of emergency or knowing how to fix small things in your car or around the house. Do you always take your car to the garage to exchange a broken bulb? Do you call the plumber every time your drain is clogged?
I think it is easy to see that using k3b to burn a CD is probably more intuitive to many than actually typing in the long command lines it actually uses by hand, but you should keep in mind that if the CLI were to go then programs such as k3b would have to come up with their own cd recording routines instead of just being spiffy interfaces for them. Even understanding the fact that they are, and that therefore testing different interfaces to see whether one program can use the recorder which the other cannot, is pretty useless: they all use the same underlying commands.
This is already a step towards understanding the CLI, even if it doesn't involve actually typing anything at a prompt. I mean, how many users have you seen who wasted a lot of time trying to play back DVD or mp3, going from one player to the other just because they never knew that they all use the same underlying technology, and that if the appropriate decoders and unscramblers aren't present it just won't work? Yet again, the graphical metaphor might be misleading: the other player looks like a different program, but essentially it isn't.
In the end both the GUI and the CLI are tools to be used in specific circumstances. It is useful to know both. Nobody expects you to know everything about both of them, just enough to enable you to do what you want to do.
Here's a real-life example:
As a Gentoo user, I sometimes have tasks running which take some time (compiling my updates from source, even automated as it is by the portage system, takes time). Early on I thought that it would be nice to have a way of telling the system to do something when something else eventually finishes; like for instance, to shut down the computer as soon as the already running upgrade process is through. Yeah, I know about stringing command together by && but what do you do when the time-consuming process is already at work?
Well, I wouldn't say that I script very often and I need to consult books and manpages even for the most basic syntax, but it wasn't too hard to come up with a script I called 'waitfor' which would watch a given process ID and wait for it to end and then execute a command given as a parameter. I don't think there is a GUI way for doing that. It's not that there couldn't be, but apparently nobody ever wrote a program for that, at least I never found it. You bet that something as simple as that (you can count the lines of the actual script code on your fingers and still have some left) would cost money in the Windows world.
And then there's the satisfaction of making the computer do something it previously couldn't. A GUI cannot give you that because the GUI offers you only what the GUI designer thought you would need. If that's all you need, that's fine. For me, both the CLI and the GUI have their uses, and you shouldn't worry about getting rid of one or the other but rather about finding the correct balance between the two for you to achieve what you want to achieve.
After all, you don't throw out half your vocabulary just because there are figures of speech you don't have a proper use for.
Any interface is a metaphor for what you're really doing: shifting zeroes and ones around. Absolutely everything you ever do on the computer is just a metaphor, whether it's using a GUI, the CLI or even programming.
And like language metaphors, different metaphors are useful in different contexts and apply to different ways of thinking and expressing your intentions. It's pretty useless to discuss which metaphor is more intuitive than the other because there is no objective, true-for-all answer. People don't all think or learn alike, why should they agree about what is intuitive? Even among GUIs alone you will find people who disagree about which GUI is easier to use, and they all have valid arguments because in the end what decides truth for them is their individual perception.
I have been using Linux since 2003. I used to know my way around the DOS command line as I was using that system when Windows was still a separate GUI interface for it and sold as such. I never knew that fear of the command line in Linux although I realized very quickly that it was many magnitudes more complex than the DOS one. I use it when I need it, but I wouldn't say I'm a command line 'guru' or any Linux guru at all, for that matter.
On the CLI I prefer to use such programs as mc or htop to the actual commands because well, I find that commands such as chmod are not my way of doing things; I use mc instead. But I do realize that expending the effort of actually memorizing the chmod syntax would speed up the process if I had to do it often, which I don't. But that's just me.
Why do I think that mc is a better solution for me than using a graphical file manager? Well, for example, when I delete something in mc I know it is deleted. When I delete something in the GUI it usually goes to the trash can. So to delete files from a USB stick I have to delete them on the stick and then empty the trash can because while the GUI tells me they are gone they actually still reside on the stick and I just can't see them. Not my definition of intuitive.
On the other hand the graphical manager comes in handy when I browse image collections because it can give me thumbnail previews. I don't like programs which are specifically geared towards image collections because they tend to hide where the images actually are. I want to deal with paths and folders (one metaphor) and not collections of images grouped together by the software but unrecognizable to anything else - that's just not helpful for me.
So what it all boils down to is that you use the metaphors you're ok with. And I believe that choice is essential: it is true that most computer users won't actually need the CLI, but knowing the basics of it is as useful as knowing a bit of first aid in a case of emergency or knowing how to fix small things in your car or around the house. Do you always take your car to the garage to exchange a broken bulb? Do you call the plumber every time your drain is clogged?
I think it is easy to see that using k3b to burn a CD is probably more intuitive to many than actually typing in the long command lines it actually uses by hand, but you should keep in mind that if the CLI were to go then programs such as k3b would have to come up with their own cd recording routines instead of just being spiffy interfaces for them. Even understanding the fact that they are, and that therefore testing different interfaces to see whether one program can use the recorder which the other cannot, is pretty useless: they all use the same underlying commands.
This is already a step towards understanding the CLI, even if it doesn't involve actually typing anything at a prompt. I mean, how many users have you seen who wasted a lot of time trying to play back DVD or mp3, going from one player to the other just because they never knew that they all use the same underlying technology, and that if the appropriate decoders and unscramblers aren't present it just won't work? Yet again, the graphical metaphor might be misleading: the other player looks like a different program, but essentially it isn't.
In the end both the GUI and the CLI are tools to be used in specific circumstances. It is useful to know both. Nobody expects you to know everything about both of them, just enough to enable you to do what you want to do.
Here's a real-life example:
As a Gentoo user, I sometimes have tasks running which take some time (compiling my updates from source, even automated as it is by the portage system, takes time). Early on I thought that it would be nice to have a way of telling the system to do something when something else eventually finishes; like for instance, to shut down the computer as soon as the already running upgrade process is through. Yeah, I know about stringing command together by && but what do you do when the time-consuming process is already at work?
Well, I wouldn't say that I script very often and I need to consult books and manpages even for the most basic syntax, but it wasn't too hard to come up with a script I called 'waitfor' which would watch a given process ID and wait for it to end and then execute a command given as a parameter. I don't think there is a GUI way for doing that. It's not that there couldn't be, but apparently nobody ever wrote a program for that, at least I never found it. You bet that something as simple as that (you can count the lines of the actual script code on your fingers and still have some left) would cost money in the Windows world.
And then there's the satisfaction of making the computer do something it previously couldn't. A GUI cannot give you that because the GUI offers you only what the GUI designer thought you would need. If that's all you need, that's fine. For me, both the CLI and the GUI have their uses, and you shouldn't worry about getting rid of one or the other but rather about finding the correct balance between the two for you to achieve what you want to achieve.
After all, you don't throw out half your vocabulary just because there are figures of speech you don't have a proper use for.
Total Comments 0