Sponsored by Microsoft
Microsoft responds to the headlines. view!
microsoft.com/everybodysbusiness - Read our developers' points of view on the headlines making news.
58 Comments
- dukeinlondon, on 10/12/2007, -4/+27Still useful for those who don't mind filling their heads with knowledge
- bingbongnana, on 10/12/2007, -1/+22You are preaching to the converted.
This introduction will help those who do want to learn how to use the CLI but are scared of it or think it'll be too hard. - dharm, on 10/12/2007, -4/+13"It's easier to click an icon"
for items in the app path, even on windows, i find it easiar to type the application name at the bash prompt or run box than going through menus or clicking a icon - cdmarcus, on 10/12/2007, -0/+8Here's a metaphor. A GUI is like trying to communicate with someone by waving your hands around and pointing. A CLI is like speaking to someone in a language you both know. It's easier to just wave your hands around, but once you learn the language, you can communicate faster and more efficiently.
- 022A, on 10/12/2007, -3/+9That's what tab completion is for.
- Obsidian743, on 10/12/2007, -1/+6A command line looks scary? TF? A blinking cursor with a symbol next to it looks scary? You know you can turn off the blink, right? Oh, wait...you mean the appearance of a command line implies some largely cryptic, drawn out commands for even simple tasks and God-knows-what for complex stuff? If a command line looks scary to someone they should save themselves the trouble and do us a favor, too. I, for one, am not at all hell-bent on converting everyone to Linux for the simple fact that it's not for everyone. There is no such thing as a "command line for everyone".
This line:
"If you know the correct commands, then you can start any program, check your computer%u2019s status, and see what files you have stored without having to find the listing in your menu"
says everything about the article. LAFF. - SoldierPrime, on 10/12/2007, -4/+8Well if the command line is for everybody we all wouldn't be using some form of a GUI now would we?
- inactive, on 10/12/2007, -0/+4This is a big failure of the Windows command line. Especially the "moving the cursor" part. It's rediculous how under-powered it is. On Linux or OS X you won't have this problem. You can actually cut & paste with the Windows command line, but only by using the context menu (right click) or the toolbar. Using the Windows command line after having used something more powerful is extremely painful.
- ordminute, on 10/12/2007, -0/+4Contrary to popular opinion, you don't have to remember command lines every time you want to type them.
Instead it's good to have a scripts directory containing textfiles of those commands you find handy and copy and paste them (or just use 'cat file') when you want to use them. For instance what say you want to change all the files ending in 'JPG' in your directory (as they come off a digital camera) to 'jpg':
for i in $(ls .); do src=$i tgt=$(echo $i | sed -e "s/JPG/jpg/"); mv $src $tgt; done
No one should *have* to remember these scripts, so just have it on file. If you're feeling really savvy you can just add an alias into your Bash runtime options file (/home/you/.bashrc).
I have scripts that do things like downloading a file with bittorrent, SMS me when it's done, rename the file to include a date, copy it to a directory and then burn it off onto CD and then remove the original file - all without having to be at that computer at all. All this work is done just done by stringing commands together, either from file or just typing them out.
The internet is full of great bash scripts that can be stored to make your use of a Linux system much more enjoyable, while also allowing you to automate what your machine does. - mattwestm, on 10/12/2007, -1/+5Let's face it, CLI apps have always been more stable than GUI ones. But, the command line on Windows is almost useless unless you are using networking tools.
- tqk02, on 10/12/2007, -0/+3"It's easier to click an icon. Most people don't want to fill [their] heads with all that command line stuff."
What happens when the icon doesn't do what you want it to do?
Most regular people don't understand that the command line is *a feature*. It's far more powerful. With pipes and indirection, you can successively build up a very powerful feature, watching how each step works and tailoring it for what you want to achieve. - duality, on 10/12/2007, -0/+3That's not a bad metaphor, but I can refine it a little bit.
Using a GUI is like pointing and holding up signs. When you do it, there can be no doubt as to what message you're trying to get across. The people who make your signs have made one for every message they think you might want to send. Unfortunately, if you don't have line of sight to what you want to point to, or the people who make your signs haven't made one specifically for what you want to say, you're out of luck.
As you say, using a CLI is like speaking in a common language. Words and phrases vary, but the concept of a "sentence" is almost universal (at least in natural languages). To form a sentence, you put together words and phrases in a logical way. When you use a word in a sentence, you don't have to imagine every linguistically possible sentence that you can use the word in. The person (or computer) listening to you has the ability to break down what you say into smaller components, and extract meaning from each of them and how you have associated them with each other. In other words, you can say things that the other party hasn't explicitly thought of.
In the same way, you can understand these sentences I've written here in English, even though you've probably never imagined any of these exact strings of words before.
Edit: Darn. mcspang said most of what I was thinking already. - chrono13, on 10/12/2007, -2/+5http://unixmages.com/
On the right hand side of the page, it offers downloads of the book Unix Mages in PDF.
Unix Mages is MUCH easier to read, easier to understand and funnier.
"What you see before you is your terminal. The terminal is the main tool of our craft -- it’s where we
cast our spells."
Simple PDF, great *free* book.
Orriginally on Digg here: http://digg.com/linux_unix/Unix_for_the_Beginning_Mage_book - AMSRay, on 10/12/2007, -1/+4Some tasks are much faster on a command line, some tasks are easier using the mouse. It doesn't have to be exclusively one or the other. Typing "Start c:foldername" opens the folder much faster than having to drill down from the root of the drive in a window, especially when you want to jump directly to a subfolder..
- chrono13, on 10/12/2007, -4/+7More that Windows has done for us:
* GUI broken? Re-install.
* Batch actions? SOL or 3rd party
* Low hardware? Throw it away! It's worthless and can't be used for anything. Don't be poor. "Many men of course became extremely rich, but this was perfectly natural and nothing to be ashamed of because no one was really poor — at least no one worth mentioning."
To get a Windows-centric (GUI) version/power of the nix CLI, outside of cygwin, one would need to spend quite a bit of money on costly 3rd party software, download and install a ton of free and non-free invasive software, and after all this - you have powerful tools that can search, batch, script and otherwise make computing easier and allow for a "almost no limit to what you can do" in exchange for quite a bit of money and system stability (after you install several dozen third party applications).
The mouse has not replaced the keyboard. The GUI has not, by any means, obsoleted the CLI.
Sure, most Joe's and Jane's don't use the CLI, but for many professionals, if we lost the CLI, we wouldn't be lost for a lack of how to do it via GUI - we would be at a loss because much of it *can't* be done by GUI, and hours are wasted mousing around accomplishing what would have otherwise been a simple one-line task.
CLI can be a nightmare for day-to-day tasks. Point and click is easy, brainless and the reason why most Linux users run a GUI is because it is great for general tasks. For everything else there is the CLI. Once Monad/PowerShell/UnixClone finally makes it into Windows, many people will realize the awesome power of simply telling the computer what to do and having it done. As apposed to having to do it yourself through 12 GUI windows and much mouse "pumping" to power the computers actions.
I love the CLI, but this title is terrible. CLI should be *available* to everyone, but not everyone will find that they need it. - cesclaveria, on 10/12/2007, -0/+3really all it takes is some practice, and a lot of TAB, you can certainly do things faster in CLI.
- iupetre, on 10/12/2007, -0/+3Let me ask you this.... Let's say you forget, or don't have the admin password on a Mac running 10.4.x, and you don't have the OS CD.
You boot with Command+S and the command line to reset the password. - deadbaby, on 10/12/2007, -0/+3Is clicking an icon really easier? It's just a different way of doing things. You could say watching the movie is easier than reading the book. I suppose it's true but that's not going to stop me from reading.
- inactive, on 10/12/2007, -0/+2That is an amazingly accurate and concise way to explain the differences between the two systems. It is easy for anyone to recognize how clumsy it is to communicate by waving your hands around. Sure, modern GUIs are slightly less clumsy than this simply because they are very predictable, but this difference is nothing compared to the difference between verbal and visual communication. Visual "vocabulary" (in your metaphor clicks, drags, double-clicks, hovering, etc) is extremely limited and allows only simple operations. A decent CLI will provide a much larger vocabulary, and this vocabulary will almost certainly be extensible.
It is of course easier to "learn" this visual vocabulary. But try to communicate something moderately complex, such as "move all files starting with the letters q, f, and z to the 'junk' folder," and you'll find that it isn't feasible (Yes, it's possible. It would be something akin to sign language. With a mouse. *shudders*). And don't even think about trying something really complex like "read the contets of this log file, filter out all entries that are older than a week ago or that contain the word "succeeded", prepend a line number to each line, and send the results to the printer." It can't be done. With a CLI that's half a dozen lines, max. All you have to do is learn the lingo. - Exiler86, on 10/12/2007, -0/+2Pretty good at putting things in simple terms. I can't imagine it enticing a new user to want to learn the command line though.
- Markie1006, on 10/12/2007, -0/+2If you're really interested on getting proficient with the commandline, pick up a copy of O'Reilly's Unix in a Nutshell.
It describes most of the really essential commands with examples on how to use them best.
Nothing beats the CLI when it comes to having to manipulate a 500mb logfile (awk and sed are your friends here). - inactive, on 10/12/2007, -0/+2One thing that bugs me is how command lines don't let you use your mouse to select text, move the carot, highlight text, or mess up ctrl + v. Depends on what you use, I know, maybe yours does allow that stuff. I do like how you can just type "calc" or whatever, and the calculator will open (in windows). But this is only easier if command line is already open and you have too much junk installed and cluttering your programs menu to go searching, if not, then yes, go for the "double click". Don't have to memorize any commands for that.
- 022A, on 10/12/2007, -0/+2The CLI isn't for everyone, every application or every task. Trying to convert people who simply don't need or want to use it is silly.
I can start an iso buring at the CLI before the Nero splash screen would have appeared but, someone's easy DIY gadget instructions or food recipe would be worthless to me because it requires "common household materials / materials" that are not now, never have been and probably never will be sitting around in my house.
It's the same difference.
However, there's one place the CLI is king, at work....
It drives me crazy when I run into lame-ass software intended for use by administrators that doesn't have a decent CLI. If I can't cron, grep and pipe a "datacenter" app then I have absolutely no use for it. - vmc303, on 10/12/2007, -1/+3This may surprise some of you, but most people have zero interest in "learning" an operating system. They think an OS should be transparent, and only minimally intrude into the tasks they set out to use a computer for in the first place. That doesn't mean they're dumb or lazy, and more than someone who uses a car for transportation is dumb and lazy for not caring about the advantages of manual transmission. This is the basic insight that the open source community still has yet to really come to grips with, and is the reason why Linux on home PC's remains a hobbyist's OS.
Besides, if you're going to go on a campaign to get people to learn more about their computers, most people's time would be much better spent learning some programming fundamentals rather than the ins and outs of any particular operating system. - adml_shake, on 10/12/2007, -1/+3I don't think it's scary as much as it is time consuming. That's what drives people away from it. When I'm at work and I need to get something done then I'll take the ol point and click any time it's offered to me. It's easier, faster, and lets me get on with other stuff that needs doing. Now on the servers we have to use the command line because there's now GUI on them. Saves the processor power for more mission critical tasks....
- coachace, on 10/12/2007, -0/+2I think we've all missed the point. Yes, CLI is great and we should all recognize its strengths. This article, however, is a little weak. Unless, that is, most of the digg community needs a remedial CLI lesson so basic that is makes my "ls=dir" brain bleed. No digg here.
(go ahead and bury me now). - V1ncent, on 10/12/2007, -0/+2Yeah, new users would go not a GUI and keep going.
- betona, on 10/12/2007, -0/+2I was using command line before it was cool... circa 1977. On a 2-color (black and green) monitor. Uphill both ways. In the snow.
Mice and clicky clicky are nice too. - requiem18th, on 10/12/2007, -0/+1The answer to the question, what is the fastest way to do something, using the giu or the cli? Can be answered with another question. What shell are you using RIGHT NOW?
If you are using a graphical shell like a file manager, the quickest way to interact with the file in front of you is by clicking on it. If you have your prompt open at "~/Desktop$ " the obvious way is by typing a command.
Honestly tho, there are 3 extremly easy to remeber rules that will change the way new users see the cli.
Rule number one, tab autocompletes, not only it it saves time, it prevents typos.
Rule number two, --help will tell you any thing you need to know about a command.
Rule number three, hit 'up' to get command history, saves more typing and/or let's you fix stuff. - salmonmoose, on 10/12/2007, -1/+2""It's easier to click an icon"
for items in the app path, even on windows, i find it easiar to type the application name at the bash prompt or run box than going through menus or clicking a icon"
This would be more convincing if it wasn't for the typo ;)
Personally, I take the best from both worlds - for launching applications nothing quite beats quick launchers; Not only can you launch exactly what you want, rather than having to hunt for items, but you don't have to type the full name. - nybble41, on 10/12/2007, -0/+1@lunarworks - "Here's another metaphor: You're in a grocery store. A GUI is grabbing the exact item you want off the shelf, and putting it in the cart. A CLI is telling a clerk what you want, with the specific details so they can find it."
Not bad, but consider that the "clerk" in this case is a computer, which can return with what you wanted instantly, provided it was properly described. Which would you prefer: (a) describing what you want to the clerk, and receiving what you asked for instantly, or (b) wandering around the store looking for specific items (which may have moved since you were last there). Option (b) would be advantageous only in cases where you don't know how to describe what you're looking for. The rest of the time I'd take option (a). - inactive, on 10/12/2007, -1/+2"This may surprise some of you, but most people have zero interest in "learning""
ANYTHING.
Who do the cow and sheep people call when their brain is forced to think? The geek. - monergist, on 10/12/2007, -0/+1Command lines used to be scary for me.
It wasn't the bleakness of your usual black on white, or even the blinking cursor. It was the sheer amount of commands that could be used. Once I installed Linux and played around with it, and read and worked through some how-tos, I quickly adjusted. While I'm still a command newb, I'm comfortable with using a command line. Sometimes you just gotta dive in.
I also think that no, its not for everyone. Not because its too hard for them, but a matter of preference. - rewritable, on 10/12/2007, -4/+5My problem with CLI is that I miss spell often by accident so I waste time typing and backspacing when it is SO much easier to just click on somthing. I read an article once that was pro CLI and the author said he could do everything faster in CLI. That is because he can type real fast and hardly ever miss spell. If I was forced to use CLI I just wouldn't use a computer.
- fortezza, on 10/12/2007, -1/+2I stopped reading after it said the CLI was an older system. CLI apps are updated all of the time just like GUI applications, often an app has both a CLI and an GUI interface for doing the same tasks, and they are updated at the same time.
As far as which to use, the answer is both. Whichever interface gets the job done more efficiently is the way to go. So if you want to delete a bunch of files, you can start a GUI file manager, select all files, right-click and choose delete, or go to the command line and do a "rm *". However, if you want to append a ".old" extention to the file names, then the command line it going to do it with one command, while a GUI ( e.g. Konqueror or Explorer ) is going to take forever to complete the same task.
The tutorial could needs a LOT of work. Better luck next time. - jhepoy, on 10/12/2007, -2/+3The fact that you are an expert in CLI doesn't mean that the article is totally useless.. I didn't digg this because I think it's too basic for me.. but I gave the article to my 12 year old nephew and is indeed a great help for him learning the *nix world..
Maybe people like you are the first to answer in forums phrases like "RTFM!" - inactive, on 10/12/2007, -0/+1PS Many of the (coherent) arguments made for the command line I already set in concrete once and for all time http://penguinpetes.com/b2evo/index.php?s=stealth&submit=search blog and boy does it come in handy for scenes like this!
- inactive, on 10/12/2007, -1/+1Meh... CLI tutorials are a dime a dozen, Google 'em.
Folks, I am the most zealous of Linux zealots, and I honestly don't care if nobody uses a command line but me. Command lines are like sex: Until you've mastered sex, masturbation makes more sense. Similarly, until you've developed your computer usage to the point where you really *need* a command line, their existence will seem silly to you; point-n-click will seem the only way to go.
If all you ever did with a car was drive it, the point of wrenches and screwdrivers and socket sets would be lost on you. But you don't heap hatred on mechanics like we see heaped on command line advocates? That's an almost exact anology. If command lines don't seem right to you, it's probably because you don't need them. Leave them alone and leave those of us who live on the command line alone. We build your pretty GUIs...from the command line! - GMorgan, on 10/12/2007, -0/+0Lets be fair is the quickest method for searching for a single file among 10,000's randomly spinning the mouse wheel until you see it or #ls | grep *###* (where the # are for the string you know).
Not to mention, if you wanted to take a music collection and change it so instead of ~/music/artist/album/tracknumber-tracktitle.extension it went ~/music/album/tracknumber-artist.extension.
Then say the songs are all in different formats and you'd prefer oggs. How would you achieve that in a GUI and how much requires human intervention. How quickly could it be done via a bash script. Its true that you could script to some extent in Windows but its still really CLI and your still limited mostly by the commandline API calls.
Anyway I think 80% of jobs are faster in a GUI with 20% better via CLI. - Obsidian743, on 10/12/2007, -1/+1I really don't think it's even that complicated. People are just better learners visually. The types of people more likely to use a CLI are those that have more abstract cognitive abilities and have a better mental capacity to remember manual, non-visual tasks. Not scientific, but I would bet my left kidney on it.
- kewldude606, on 10/12/2007, -2/+2OK, and when you download 2 things and there's no CD in the drive?
You do not have a script that does that...but nice try. - burr, on 10/12/2007, -2/+2Sitting here arguing about how one way is faster or easier than the other is just plain ridiculous. Everyone is going to have their own preference. The fact of the matter is that most users have no use for the command line, nor do they care to learn it. To act like they're stupid for not using it just because you think it's easier for you is pretty arrogant and sily.
- Obsidian743, on 10/12/2007, -3/+2Or how about WinKey-R and just "c:"?
nO0b theEHEHeh - Rayke8, on 10/12/2007, -2/+1@strangerzero
Where heads? Oh, THERE heads.... - Pooavenger, on 10/12/2007, -3/+2every 90 days some douche always makes a new guide on command lines. Give it up.
- Twango, on 10/12/2007, -2/+0"It's easier to just wave your hands around, but once you learn the language, you can communicate faster and more efficiently."
I don't know about that, the way I wave my hands around communicates A LOT. (No, not asking for a date.) - Twango, on 10/12/2007, -2/+0"That doesn't mean they're dumb or lazy, and more than someone who uses a car for transportation is dumb and lazy for not caring about the advantages of manual transmission."
I built my first computer in 1978. One part at a time. I typed in whole OS's from books, and reworked them to do what I wanted. Tons of languages, ass/disassemblers, handworked comm protocols. But Unix?
Never has a more godawful rat's nest of cryptic crap been born. - 1coreduo, on 10/12/2007, -3/+1@xafan
For you CLI seems to be easy. Think about the people that started computer era w/ GUI(windows). CLI is a totally unknown territory for them (unless win prior too 3.0).
Why CLI only applies to Linux, based on your comment? - lunarworks, on 10/12/2007, -5/+2Here's another metaphor:
You're in a grocery store.
- A GUI is grabbing the exact item you want off the shelf, and putting it in the cart.
- A CLI is telling a clerk what you want, with the specific details so they can find it. - jjkurtz, on 10/12/2007, -8/+4Just about all of these commands work on the Mac as well.
-
Show 51 - 58 of 58 discussions



What is Digg?