Linux Command Line Terror! But....Why?
What is so terrifying about the command line? Is it leftover brainwashing residue that makes Linux users say things like "How do I do this task, and don't tell me to use the command line"? Are there mean Linux geeks giving bad advice and scaring the noobs away on purpose? Anyone who can type can use the command line, like this:
$ whoami
carla
Far out, I know who I am. Now I want to be oriented in time:
$ date
Wed Mar 18 21:47:02 PDT 2009
Excellent, now I know when I am. Will Linux tell me where I am?
$ where
bash: where: command not found
Hmm, OK, but at least it didn't wig out and bluescreen like some fragile, trembling operating systems we know and snicker at. I relate to dates better in a calendar:
$ cal
March 2009
Su Mo Tu We Th Fr Sa
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
Want to know your computer's name?
$ hostname
xena
Is your terminal window getting cluttered? You can clean it up:
$ clear
Are you curious about these commands? whereis shows you the full path, the man page, and the source files if they are installed:
$ whereis clear
clear: /usr/bin/clear /usr/share/man/man1/clear.1.gz
"Man" pages are manual pages, so you could type "man clear" to learn more about it. See how simple and friendly the command line is? It's so friendly that the Windows command line is a (poor) imitation of it. Sure, you can string together commands and scripts that are just as complex and impenetrable as you want. But you don't have to; there are plenty of simple commands that are useful for everyday. Perhaps the pestilential purveyors of proprietary-ware want their users to remain ignorant and helpless; Linux wants you to be knowledgeable and not mystified. It is safe to experiment and try things out, and in fact that's the best way to learn. It's your computer after all. The worst thing that can happen is you hork your system so badly you have to reinstall Linux, and what's the big deal with that? It won't explode or catch fire, and you don't have to answer to the license police, you just do what you want. "You just do what you want" is really OK with Linux, you won't be punished.
Where do you learn more cool Linux commands? Grasshoppers, you must stand on your own two feet at least a little-- there are literally hundreds of books and thousands upon thousands of helpful Web sites. Go forth, and be not afraid to learn.
References
The Linux CLI for Beginners, or, Fear Not the Linux Command Line!The Linux Command Shell For Beginners: What is the Shell?
Linux Shell Editing Shortcuts
Navigating the Linux Filesystem
0 TrackBacks
Listed below are links to blogs that reference this entry: Linux Command Line Terror! But....Why?.
TrackBack URL for this entry: https://swarm.jupitermedia.com/mt-tb.cgi/7648



It's very understandable why people don't want to use CLI: its uninuitive. Don't get me wrong, the command line is very powerful and quick way to get things done on the system aswell as a method that keeps restrain-injuries minimal, but you need to dig through man pages or tutorials if you're not used to the language man pages are written in. You can guess the results of telling a first time new user to move a file with a GUI tool and a CLI tool...
And besides, lets face it: changing configuration with a bunch of checkboxes, drop menus and other feedback is much, MUCH more comfortable that editing a .conf file in vi/nano/whatever while wading through options and comments (and failing in the end because of a misplaced comma)
Why?????!!!!!!
It's free.
It's stable
Not hardware demanding.
I don't have to be afraid of virus or malware ( at least not more than anyone using a Mac)
The easyest would it be, the more people will use it.
Enough people means no more drivers problems because everybody would be obliged to offer drivers for Linux.
Enough people would mean that ODF could become a defacto standart.
Enough people etcetcetc...
Why????!!!!!
Pfffffff...........
I've used linux for over a year and the command line is still a pain in the ass for anything other than 'sudo apt-get update' and copy+pasting instructions from websites.
why don't people like the command line? because it isnt necessary! guis are much easier, period.
Carla,
Because people like to visualize more than remember words.
History tech you more about human behavior and technology.
Every tool we use changed with time, for good (or bad), we call it progress, innovation etc. etc. We don't want to get stuck in the past.
Remember DOS/VS, MVS.... DOS, Windows 95... Vista. MAC..Unix..Linux. etc. etc. You should review them and look how they changed over time.
Please don't criticize users about something they don't/want to know,
Instead, you should let them know why or not, the command line is useful for a regular user, not the administrator.
Remember, the computer is just a tool, the OS is just another tool that allow us to run applications, we don't buy a computer for the OS, we do, because the applications we can use on it.
Regards,
Luis.
"For those who understand, no explanation is necessary,
For those who do not understand, no explanation is sufficient."
I assume that you are talking about normal desktop users.
Using a command line is dull, frustrating and unintuitive. For tasks that aren't completely repetitive, a GUI can always beat it in terms of power and efficiency providing it is a *good* GUI. This is a distinction command line zealots fail to comprehend. Also, a GUI doesn't need to be primarily mouse based. A GUI can also be keyboard based and accept typed commands and these do exist (see Gnome-do). Even a shell interface with pop-ups to make features intuitively discoverable and icons to add visual organisation would be a massive improvement on your basic shell but I would argue that is because it actually a GUI.
"Why are they using Linux if they don't want to learn anything new?"
Why would you assume that people use Linux in order to learn something? They may just want to use a technically superior operating system or they may be drawn in for any of the other benefits frequently touted as being important to "freedom" software. Aside from all that they may have far more important things to use their valuable time and brain-power learning. The only reason not to include a GUI to perform any task is laziness. It's up to developers to decide if they want to do that but they should know that the majority of users won't touch it until it gets a good GUI front end.
People really need to be more welcoming to anyone wanting to try Linux for whatever reason when we really need to encourage the adoption of free software instead of being held back from our true potential by a software monopoly. The problem with your attitude is that it comes from being a geek. And I don't mean the modern spin on the word geek adapted by its victims to gain social acceptability and I'm not using the word in relation to intelligence (any idiot can use a command line). I just mean a plain old-fashioned geek.
We all used to suffer through DOS, when we HAD to use CLI. Maybe its genetic memory reliving that nightmare :)
Seriously, I agree! Go try it. Linux will protect you from a lot of mistakes that windows won't. Try something, see what happens. We reinstall windows regularly and think nothing of it. Linux has BETTER out of the box support for large categories of hardware than windows these days. I STILL have to load drivers for many kinds of devices under windows.
Try it! Be aware that Linux is NOT windows, and some things will be different, (maybe even better :)
Peace
rotflmaoapmp @ "going all Barbie".
seriously tho, how hard can it be to learn a few simple commands such as cd, ls, cp, mv, etc. once you learn them they're yours forever. ok, maybe it's a bit of a challenge to learn some of the options, switches, arguments, etc, but again once you learn it's actually fun. then you can start to discover some of the more powerful utilities such as the SoX suite, ImageMagick suite, ffmpeg to mention a few. then there's grep, wget, pipes, etc. then there's scripting, for loops, regular expressions, etc. i'm lovin' it. this is where the power is people.
i like the quote/cliche:
"games don't run on linux because linux IS the game".
Let me tell you something: my dad, who took to his first CP/M machine like a duck to water, surprising everyone who knows him, still doesn't quite understand the desktop metaphor. Try telling him it's more "intuitive".
What's "unintuitive" about a CLI? You type a command, the computer executes it. The only thing that might be a bit tricky is that you have to remember what parameters do what, but that's what man pages, --help parameters, and multiple VCs/tabs are for.
Don't get me wrong: I'll always use a GUI if it's there. But I've never understood the morbid fear people brought up on Windows and MacOS have of losing it. I think "Me" might have a point: the DOS CLI was so hopeless, people don't realise it doesn't have to be like that.
@nou:
whoever thinks that the cli is no longer necessary has never administered systems. Mark my word, I am not saying linux, I am saying systems (so windows falls in this category too). If you think you can administer a network without using shells, well, how could I put this mildly? If you were looking for a job as systems administrator I would not hire you ;-)
Clis are also very very useful for developers of web applications. Why develop a function when there already is a system call that does what you need?
And last, but not least, if you really want to be efficient at working with a system, if you do something more than once you should be scripting it. If you do routine stuff with a gui, the chance that you make mistakes is much bigger than if you script it.
Computers are good at this stuff, much better than humans, actually.
But hey, it is a free world, if you want to waste your (and your employer's time) then it is fine with me.
commandline is still terrifying to me after 7+ years of running linux.but... i have to say there are essential commands everyone needs to know.just because i like to tweak too much and mess my conf up so i need a text based browser and ability to get to web sites for help when i do mess up.a few other commands that you can use to rescue your system is also helpful to have printed out and available.i ran mandrake for years and some of my updates would have to be backed back out and commandline was easiest way to clean them out.you dont have to be a techy either to use a few simple rescue commands,some are quite simple.lots of irc channels and websites with lists of commands to answer your questions without having to reformat C.
br3n
Recommended reading: In the beginning ... was the command line, by Neal Stephenson
I agree! I was writing in defence of the command line just the other day.
Why am I afraid of CLI?
Because it's like carrying a hunting gun. If you know how to use it, and are careful with it, you can do with it what you need to do and get the correct results.
But one mistake can be deadly.
Let me illustrate:
hdparm -u /dev/hda
hdparm -U /dev/hda
What's the difference between those? Hint: one of them can seriously damage your hard drive.
Command lines are powerful. Way too powerful, even for an expert user. Ask any linux/unix administrator and they will tell you about that time that they use the rm command and made a "slight" mistake. They all have a story like that.
GUIs are safe. Let the expert handle the bombs.
IMHO, the issue is not the command line. As Apple have figured out, the input is the issue, and typing is not intuitive. Without dedicated practice, touch typing remains out of the reach of a lot of people, and to prevent them either showing their ineptness at it, or creating a SNAFU with one wrong letter, they'll stick to the mouse, thank you.
The beauty of the mouse input is not the way you can repeat the same action 500 times instead of a 2 min script. It's the ability to see the results without having to learn another skill (touch typing).
For those who believe that the CLI is 'unintuitive' then I'm pretty sure you've never been in a situation where it was the only option. Try administering a linux server remotely - or even a local one (and *IF* you've installed a GUI on your server, then you should be slapped).
I can out-GUI a desktop any day with a CLI. I guess I've been using Gentoo too long. It's saved my backend too many times. Ever b0rked your nvidia driver in Linux? CLI to the rescue, no matter what distribution you use. And no BS about the myriad of distros being a distraction to new users. It's all about choice and with windoze there is only ONE.
It's even helpful in Windoze - for example, say your system has one of those really nasty rootkits and you've been totally pwned (you're running windows, what did you expect?) You download ComboFix and install the Microsoft Recovery Console (Eh? What's that? A CLI for windoze?) Run ComboFix and make note of the offending rootkit files. Reboot to the CLI, attrib -S -H -R the files so you can then delete them.
Try THAT with a GUI. It's not going to happen bub.
BTW, if you try the above in windows, to get out - just type 'exit'.
Remember, Google is your friend.
NTTP
@Passerby:
Yes, I know that situation too - I once nearly killed a server when trying to change permissions. Was going to type chmod 750 ./ and forgot the '.' - but I understood what I did and know not to type with a new keyboard in the dark anymore :-)
NTTP
as sexysofie, some commands are fun to play around with, like mv. I think I mostly use longer time moving files by using it but some time I just use it for the fun of it. using cd and Dir to look around in your folders can be fun to.
However as Passerby points out, it's a terribly powerful tool, if you don't use it right or do a mistake you risk shooting your own foot.
However Carla, you try to point out that the command line is nice, and that you just can use the man command, and it will tell you about the command, but in many cases the man pages are written... well, in a very useless manner for people who are not familiar with Linux and technical terms.
The CLI is more efficient and easier to use than GUI. GUI-only interface is very bad since it does not allow for scripting.
The critical advantage GUI has is that it is often possible to find out how to do something by just exploring GUI. Microsoft created the illusion that in Windows everything can be discovered that way and many people know nothing but clicking through GUI in search for a solution. Microsoft always wanted to control what user do and want, and GUI lock-in helps a lot.
The very idea that Linux must be all GUI is harmful. Instead of creating GUI like KDE network setup that just says "Oh, I do not understand your distro" (and this is better than ruin it), it is necessary to solve the real problem - allow to find a CLI command without knowing its name.
Passerby, that is one silly and extreme example. In 'man hdparm' the dangerous switches are clearly marked with DANGEROUS warnings, like
-U Un-register an IDE interface (DANGEROUS).
You do Linux users a disservice by claiming that the CLI is dangerous. What do you think the GUI is, something completely separate? No, it's an interface to the CLI. Ignorance and fear are dangerous.
Oni89, I can't stuff a whole book into one blog-- there are good references at the end, and surely "there are literally hundreds of books and thousands upon thousands of helpful Web sites. Go forth, and be not afraid to learn" is clear enough.
@passerby,
GUIs are safe. Let the expert handle the bombs.
$ hdparm -u /dev/hda
-bash: hdparm: command not found
When choosing an example, choose one that can be easily reproducible. hdparm is not installed by default in most distributions, and nearly noone ever needs to use it. I know I have never had to use it and have administered systems for 10 years.
If some noob reads in a website 'hey, this is superkewl and you must try it' and fscks his hard disk, well, that's tough. What's the difference with same noob in windows that sees a superkewl reg hack and without reviewing it applies it to his system? Borked system maybe? Or what about the britney spears free screen savers that you can freely download from this handy link ..., o wait, your pc is no longer yours, it belongs to the seti project. Or ..., or ..., you get the picture, with a gui you can bork your system in many different ways. If it was so safe as you put it there would not be a whole software industry out there to fix all windows systems that got fscked thru a "safe gui".
Systems are complicated. People need to learn stuff in order to use them, be it a gui or a cli. And when the sh*t hits the fan, yeah, the experts handle the mess. But this applies to windows as well.
I'm sorry Carla if you felt that I was in any way attacking you, I just didn't agree with the man page being useful, or friendly for that matter.
Oh yeah, I also forgot to write something in my previous comment, it were some nice small command line, commands you posted there, they are not in anyway near being threatening, and because of that they are just what some CLI newbies like me need to try out some commands just for the fun of it which later might lead to testing more, and maybe more powerful commands.
Hi Oni89,
You are too gracious to an impatient, terse old lady :). You are right that man pages usually aren't very friendly or helpful when you're starting from scratch. A lot of them aren't even very good at explaining what the command is for. Might be a good thing to start collecting some good noob-friendly howtos and sticking them somewhere permanent on Linux Today. Hmmm, I could do that...
Yes, the hdparm command can be dangerous. However, unless your an idiot who runs everything as root or set your path to include things it shouldn't, you'll find that
me@mysystem ~ $ hdparm -u whatever
bash: hdparm: command not found
--
doc
Hi,
I have a good example of someone who doesn't use the command line.. my wife. She has a dell laptop that was running dare I say it XP.. It was running really slowly and getting clogged up so instead of doing the old reinstall windows trick I put Fedora 9 on it for her. Now she just uses that to look at websites, write docs and check email. She is oblivious to what lies underneath and I think that is fine.. at least she is using linux now and I don't have to fix some crappy windows problem every 2nd day.
ben
naxto, Carla Shroeder:
You are missing the point.
I used hdparm because that's the one I had on top of my mind. What I meant to illustrate is that something as small as capitalization can have a very different meaning when using CLIs.
With a GUI, if you click on something, or check a box, the program will send the correct command always. There's no chance of making a typo and sending a completely different command.
NTTP shows another - maybe a more common example -: a missing period ( "." ) can be very dangerous.
My point is that for users - even advanced users - a GUI is safer. Granted, if you know what you're doing, a CLI is more powerful; but CLI's should be for those who know what they're doing.
Telling newbies that CLI's are "teh l33t" and that they should not be afraid to use them, is like giving guns to inexperienced people.
Just MHO.
I'll give you all just ONE reason why shells are important: connecting remotely.
I can control my home server from anywhere in the world with a dial up connection period.
I can administer a complete datacenter quickly and effectively from my desk.
GUIs are important? Of course yes. And they are tailor made for today's needs and tasks.
But why does a server needs a gui??? Microsoft and Apple never replied my emails about it. And no one else in the world.
Imagine administering 100+ servers clicking around? No way.
I'm a desktop user. From my perspective, the CLI is evil. It is a warning sign that says that the Linux community would rather be archaic than modern.
The people who preserve the current (ancient) CLI don't care about the needs and preferences of millions of desktop users. They are locked in the past when they say that this CLI is the best CLI that can be done.
Linux techies could strive to make an easier, safer CLI, with meaningful error messages. A modern CLI with context help, like Open Office functions, might help sell Linux. But instead of making a CLI for the masses, techies continue to feed their own egos by saying that the current CLI is easy. They'd rather call me names and try to force me to spend a huge amount of effort to learn some difficult things that should be easy.
Maybe a new Linux CLI could be a huge asset, giving desktop users access to power that they have been afraid of. However, the Linux communities' techies decided long ago to restrict access to this power to techies, burried under cryptic man pages, and they aren't about to change now.
The current, archaic Linux CLI should be an embarrassment to those who truly want to see Linux on every desk.
Commandshell ..ah those memories.
Now - I'm a CAD-guy. Drawing is my thing. So I start up my computer to do just that - draw.Why on gods green earth would/should I bother about the shell?
I dont think my boss will pay for the time I spend there, I dont think my customer wants me to spend time there unless its beneficial to him and I KNOW I dont wanna be there becouse I'm supposed to catch deadlines, concentrate on my work as a CAD-guy ...that being drawing.
Now, I might be not as "gifted" as everybody else seems to but for me my CAD-software has enough of quirks and perticulars to keep me occupied fulltime. Thus again - "why on gods green earth would/should I bother about the shell" ?
In this time, when the wheels of software/industry/life spin fast and hard it's though enough to run with ones speciallty -Why on gods green earth would/should I bother about the shell ?
Get it ? : )
Best regards,
AlienShard
@Passerby
it's natxo, not naxto (you're right, using a a keyboard is difficult ;-) )
Do you think no error checking is done with CLI programs? I do not know which programs you use, but there are loads of curses interfaces that check the users' input for validation, for instance. Or the getoptions libraries (c, perl, python) that check if what you input is an integer/string/whatever.
Telling newbies to use a computer is a dangerous thing. There ought to be a computer 'driving license' in order to use them.
Using the CLI is not more dangerous than using a GUI. Have you never dragged a very important folder to the wrong place? That is really very easy to do with the windows explorer and if you have the right permissions it will give no warning at all. Or maybe it will, but you grew so used to clicking 'Yes´ or 'Accept' that you no longer read those 'irritating´ UAC warnings.
Using a gui you can absolutely bork your shiny GUI box with the wrong keys in the windows register.
Using a GUI you can thoroughly trash your hard disks using the disk manager, no problem at all. Yes, you get a warning, so what, see earlier pint about the UAC. Need I give you more examples?
It all boils down to: using computers requires 1. learning stuff and 2. proper permissions. For default installations, linux wins 1. hands down, windows still gives you the first user of the system local admin privileges (I am actually shocked that this still remains like this anno 2009, but somethings will never change, I guess.).
And you know something else? Windows is pushing the CLI real hard in their new versions. Shocked? google some powershell.
First of all most Microsoft users have not seen a command line since the demise of Dos 6.x.
The thing to keep in mind is that most Windows users don't even think of the OS. That is something that came with the machine like the CPU and hard drive. They are into the applications it can run. That is all they focus on. Its like a golf game. The user is worried about which iron (app) will get him to the tee. They don't care about the golf cart (OS) other than it runs. And for sure they don't care about the batteries (Kernel) that actually makes the cart go.
For 95% of anybody using a computer that is the mindset. Poor as that is.
One area where the GUI beats the CLi every day: internationalization. With the GUI, you can have translations in as many languages as you want, you can display help messages and pop-ups...
Linux CLI is English only, which makes it hard to remember the commands for non-native speakers because they don't really mean anything. man pages are often not translated, either.
When it will be possible to just type "Copy my Dark Knight movie to the USB key" in 50 different languages, the CLI will be far more usable for everyday user.
It would be even better, if the computer reacted to the voice instead of requiring user to learn typing.
At the moment, it's only usable if you use it all the time. If you don't, you forget the command and lose time searching for them again and again.
Passersby:
My biggest rm-related mistake was from a GUI. I let a graphical installer use the default hard drive. Oops. dd though? Nope, always used the right hard drive. rm? no problems there either...
@alienshard,
your boss would be really pleased if you learnt scripting for autocad. Just google 'autocad scripting'.
But maybe you are not interested in being more productive for your boss ...
@Sam,
from your perspective, everything that costs you an effort is evil.
Why should be make a new shell when the one we have works perfectly fine? Or maybe I misunderstood you and you meant cmd.exe, in which case, yes! you are obviously right, we need a replacement for that crap.
what is wrong with this type of error message?
$ rm tdfa.tx
rm: cannot remove `tdfa.tx': No such file or directory
I mean, what do you not understand of the error message? Maybe is Dutch your mother tongue then? We can fix that for you (we are such nice guys/girls):
first we set the proper language for the error messages:
$ export LC_MESSAGES="nl_NL.utf8"
and then we repeat the command:
$ rm tdfa.tx
rm: kan 'tdfa.tx' niet verwijderen: Bestand of map bestaat niet
You can try with any other language provided the locale data of the language is installed (and you can install them either thru a gui or a cli, you have a choice, remember?)
@sam, if a CLI is so archaic, why is Microsoft eagerly pushing Powershell?
Anyway - almost everything CAN be done from the GUI, Carla and we other CLI-users just want you to see how powerful, elegant and productive the CLI can be, not to take away your beautiful GUI. (Although I get quite frustrated when people refer to, and use, a word processor as a text editor ...)
If you don't want to see, well, your loss.
@natxo
Oh, but I do and I am. I know scripting and use it for my app. I just dont care to learn "the other stuff". It's "overhead" if you like. Kind of like learning how to fly an plane before sitting down as a passenger ... but what do I know : )
Leonardo said it once a long time ago (the DaVinci guy ; )
"Simplicity is the ultimate sophistication"
If we'd all work along that line of thinking, we'd rid us of all kind of problems ...
...and thus I'm back to : Get it ? : )
Best regards,
Alienshard
My experience with command line start many years ago, learning Basic. Basic become obsolete, so i learned Cobol and Pascal, both became obsolete. Started to learn C, but was rapidly replaced by C+ and C++... Worked with Autocad and learned Lisp (autocad language).
I feel like an archaeologist, knowing only dead language, and too tired to learn another language that will die in few years only.
I never planed to be a mechanic or a lumberjack or a programmer, I prefer to leave those to people that enjoy doing that.
It does not means i will not use command line, but if I can avoid it, I am pleased.
Richard D.
@ alianshard:
"I just dont care to learn "the other stuff". It's "overhead" if you like.
Kind of like learning how to fly an plane before sitting down as a passenger"
You have hit the nail on the head there - If you want to be a passenger , then that's fine. However, somebody else may choose to fly the plane. If there were only a passenger lounge and no cockpit, then I'm afraid that you would be stuck on the runway.
"I'm a CAD-guy. Drawing is my thing. So I start up my computer to do just that
- draw.Why on gods green earth would/should I bother about the shell?"
As a choice, that too is fine. However, the world would be a dull and unproductive place if it were all moulded to match the desk of one man.
"Leonardo said it once a long time ago (the DaVinci guy ; )
"Simplicity is the ultimate sophistication""
He did. He also said,
"Blinding ignorance does mislead us. O! Wretched mortals, open your eyes!"
"He who loves practice without theory is like the sailor who boards ship without a rudder and compass and never knows where he may cast."
"The greatest deception men suffer is from their own opinions."
"The noblest pleasure is the joy of understanding."
"There are three classes of people: those who see, those who see when they are shown, those who do not see"
"You do ill if you praise, but worse if you censure what you do not understand"
CLI is about using language to control computers. Using language gives incredible flexibility and power. Unlike GUIs which are restricted by the assumptions made by developers CLI allows no such restriction.
Having witnessed many users complete failure to see some graphical object on their screen leads me to fail to see how GUIs are intuitive or natural.
Okay I am not an average user. I am a Unix sys admin and my work PC typically averages 20 putty sessions. If I had to load a GUI every time I need to work on a server I would not be anywhere near as productive.
gui makes people stupid sheep who can't think.
brain+language=concepts
cli=language+fingertips=thinking-user