Click to See Complete Forum and Search --> : Command Line vs GUI


Belgian Brownie
04-24-2009, 03:11 AM
It seems to me that a lot of Linux people prefer the command line to GUIs.

As I am from a Windows background, I hardly ever use command line instructions any more as virtually anything I want to do is possible using a GUI.

I have noticed in Linux that you probably need to use commands a bit more, but there are still a lot of GUI alternatives.

Is there a reason for the "love affair" with the text commands or is it simply a comfort zone for those who have "grown up" with Linux that way?


Yours,

Intrigued of Belgium ;)

deathadder
04-24-2009, 04:20 AM
Hey,

I'd have to say that the number 1 reason you see a lot of people on forums using the command line is because it's pretty much universal. All, AFAIK, Linux distro's by default use Bash, so we know that a set of command will work. I wouldn't be able to help a lot of people who use KDE for example if it wasn't for the command line, simply because I don't know my way around the GUI.

You will find that a lot, I'm not saying all, of the people that have been using Linux for a number of years are technically minded and find the command line more intuitive, what with the simple way Bash allows you to pass the output of commands to the input of other commands etc. I for one find it works better with my way of thinking.

I will however be the first to say that a good GUI is the way forward for the majority of users, and for computing in general, but the beauty of Linux (for me at least) is that I can drop down to the command line and do what I need too.

The other side of my love affair ;) with the command line is that a GUI has a limited number of ways of interaction. Which is not a problem, GUI's are designed to achieve a set goal, or goals, however I find that the command line doesn't have said limit and works better if what I want to achieve isn't exactly what the developer of the GUI had in mind.

Or maybe we're all just stuck in our way, but either way that's the beauty of Linux and OSS, the options I'm given to interact with my computer.

[EDIT]
By good GUI I don't mean compiz and desklets, I mean a human natural way of interacting with a computer...which doesn't really fit in with a mouse and keyboard if you ask me

Belgian Brownie
04-24-2009, 06:32 AM
OK. Thanks for shedding some light on that.

I agree the command line options are far more flexible than "DOS"-style Windows equivalents.

Rather than having a "GUI" built-in as default like Windows, the Linux approach does offer more choice.

Guess I'll have to trawl through the command manuals.

Cheers.

stumbles
04-24-2009, 07:31 AM
I think in part it would be a major chore, or pointless to guify all the cli commands. Mainly because of their modularity, their abilities to be chained with others. I like my eye candy, but at the sametime find a terminal quite handy. So prefer both and they compliment each other extremely well. Sure I could use k3b, or some other cd/dvd app to create an ISO, but then if I have a terminal open why not; dd if=/dev/sr0 of=my.iso. I can get that process started much faster than clicking an icon and waiting for k3b to pop up, and click through all that. And what if my DE/DM was borked and had a need to create that ISO? cli to the rescue.

As you may know. Microsoft is making a half hearted attempt to beef up their cli environment to be "more liknux like".

gamblor01
04-24-2009, 09:45 AM
I personally think one of the main reasons that people use the terminal is because of things like shell scripts. Linux has such a flexible command line with so many different commands (many that DOS doesn't include). You can open up the command line and do just about anything. Some examples I can think of right now specifically refer to my work experiences:

1. I used to work on a program that required a large amount of setup. Because it was a Level 3 support team (fixed code defects/implement enhancement requests) we needed a large number of environments and often needed to quickly bring an environment online to simulate a customer's environment and/or test a possible fix. Instead of doing all of that setup we had one a script that allowed us to clone any existing environment.

So think of it this way -- you install the base product. Then you install our product on top of it (either version 3.7.1, 3.8.0, or 3.9.0). Then you can clone that directory, the scripts do a bunch of replacement stuff to swap out version numbers where appropriate, and you wind up with a fully functional "second" environment that is a clone of the first without having to install anything. Just run a single command and answer a few questions. Then you can add fixpacks/patches, etc. from the command line and then clone that patched environment too. This saved us an ENORMOUS amount of time because we didn't have to manually install every environment.

Of course, this didn't work on Windows (couldn't have multiple installs on the same machine). So if you wanted to test something you had to (most likely) uninstall the existing version on the machine, run through the entire base product installer, then install our product on top of it, then install the patches manually. The time for this script to run was dependent on the machine's speed (ability to copy over a directory and perform patch installs, etc.) but usually averaged about 5 minutes. The time it takes to uninstall, reinstall, and then patch a Windows box. Maybe 45 minutes?

2. I wrote a series of shell scripts that did some tests to verify whether or not a fixpack build was reasonable. It would basically install a vanilla build, apply the proposed fixpack to it, and then run a series of tests on it to make sure that the patch applied cleanly and nothing went majorly wrong with it. So you could kick off the script, answer a few questions, and then go to lunch. Instead of running through everything manually and it taking an hour or two of your time, you come back from lunch and the script automated everything for you...and it's done.


I have some simple shell scripts at home too. For example, I have one shell script I used to checkout code (for the open source project I work on). This way I don't have to type out the long path to the SVN trunk every time I want to checkout the code. I have another I call on OS X to generate the makefile. This is because OS X has this file called Info.plist that stores information about the application (what types of files it should be associated with, what version it is, etc.). I have a shell script that greps through the file to obtain the version information and then prompts me if I need to change it. If I do, I simply type in the new version number and it uses sed to replace them for me (there are 3 lines that contain the version number in some way). This way I never forget to update the version number when we release a new one!


There are many more examples of why shell scripts are useful. Certainly they are one of the most useful things I have found with regard to simplifying computing.

blackbelt_jones
04-24-2009, 01:50 PM
First off, I want to congratulate you on being open minded and curious.

And now I want to explain what to share my own personal catchphrase with you. To me, this is the key to Linux, as it exists in the 21st century It's the url of my embryonic blog (minus the .blogspot.com) and it may be the title of the book I'd like to write. Everybody here who knows me knows what I'm about to say:

"THE COMMAND LINE IS PART OF THE DESKTOP"


In other words, there is no such thing as "The command line vs. the gui." In 1985, maybe there was, but now, (for the desktop linux user) the command line is (usually) nothing more or less than an extremely powerful desktop tool.

Now, some guys will disagree with me about this. They will say "It's not a desktop application, it's a command interpreter". These guys are programmers, and they're absolutely right, but programmers need to look at the computer from the computer's point of view, in order to communicate with it the way they do. I'm strictly a desktop user, and I'm looking at it from the human being's point of view. Humans approach computers largely through metaphor. The browser window I'm typing into isn't really a window. The folders I keep my files in aren't really folders.

Now, there is such a thing as a command line that is NOT part of the desktop. It's called the console. Once, it was the only interface there was, and it's still used by people all the time. I use it myself to run certain applications separate from the desktop, where I know thy will be out of the way and not interrupted if I choose to change my GUI.

I may be moving away from my point, but it's this. We do tend to love the command, but we love our GUIs, too, We have a whole arsenal of desktop environments and window managers, and they kick ***. The ideal that the developers have been working for is that you never have to use to command line, that you always have a choice and we're extremely close to that.

One thing that makes the command line sort of necessary sometimes is managing the system of permissions in Linux, an important reason why Linux is considered to be more secure than you-know-who. Though I happen to know a way to manage permissions entirely through the GUI, but it may not be readily available in all distros, and that's another story.

IN ALMOST EVERY CASE, YOU HAVE A CHOICE. When you never have to use the command line, you are free to learn the command line slowly, a little at a time, and that makes a huge difference from the command line of 1985, which is what many people still think of when the CLI is raised. But today's command line is nothing to be afraid of.

It looks like everybody else in this thread has been bending your ear about the Command Line's advantages, and I could tell you why I love the CLI and I could go on forever (or maybe it would seem that way) , but it's not about one tool being better than another tool! It's about two tools being better than one tool!


And the two tools work together. Most of the popular Linux desktop environment have their own version of the console emulator, and they are all integrated into the command line in some very ingenious way. Also, most desktop environments provide you with a way to use those same shell commands to program the GUI. In other words, nearly every desktop environment provides you with a way to turn a shell command into a clickable icon or a preset keyboard shortcut. Now, THAT is something I really love, getting the computer to do what I want or go where i want with a single key command, and there are ways of organizing your shortcuts that make it possible to remember dozens. THAT's what it feels like to be a power user. You just reach in there and make it happen, the interface seems to disappear.

ph34r
04-24-2009, 02:03 PM
Hey, a blinking cursor *is* graphical :)

I cut my teeth on non-GUI operating systems, and for many tasks dropping to a command prompt is either a quicker/better way of doign something, or the only way to do something.

blackbelt_jones
04-24-2009, 02:06 PM
I think in part it would be a major chore, or pointless to guify all the cli commands. Mainly because of their modularity, their abilities to be chained with others.

Major chore? I'd say it would be f****** impossible! No one needs to know "all" the commands. You need to know where to find the information that you need (the man pages, a couple of decent sites, and sometime asking around in online communities like this.) You learn naturally by doing, and by taking a few notes. If I use a command maybe three times without too much time The beauty part is I've never had to waste time learning commands that I didn't need.

The command line introduces an element of creativity into computing that makes it a lot of fun, but you need to be warned, it will turn you into a geek. Linux haters like to talk about how Linux users are different from "ordinary users" because they enjoy computing for it's own sake. Well, I used to use Windows, and back then I hated computing for its own sake as much as anyone. The command line not only saves time, it saves the worst kind of time. It cuts right through those repetative drudge jobs that made all-gui computing pretty dreary. Sorting, organizing, pushing files around... Hell, I used to spend hours on that stuff, now I can put it all in a script that takes a few seconds and does the job while I'm on the can. I spend as much time on the computer as ever, but I'm doing stuff that I like.

Belgian Brownie
04-25-2009, 01:25 AM
A big thank-you to everyone for your answers and for giving me some interesting and thought-provoking reading.

Allow me to digress and give you a bit of background (it may explain some of my rants that you have not yet had the pleasure of experiencing ;) ).

I come from a background of "non-gui", having started out in IT in 1974 on the old NCR 315 machines.

Over the years I have been an "operator", programmer, project manager, programme manager and senior consultant covering IT and business (having done an MBA with the Open University). Consequently, I moved away from the nitty-gritty technical side of things.... then the market changed. Project managers were suddenly kids of 23 and as I was in my mid-40s I was viewed as over-the-hill. I was contracting, and contracts became more difficult to find. :(

So, I changed tack. The Belgian government offer some pretty good retraining schemes and I signed up for an 8-month intensive course for PC and Network administration. Only two weeks was dedicated to Linux, which was soon forgotten and buried. Why? Simple! The scheme was designed to get people into work. What type of system has 90% of the market?

So, for the past 6 years I have been working for myself installing/supporting local small businesses, some with SBS2003 domains and some just simple workgroups - not earning what I used to, but thoroughly enjoying myself :D

Now the world's economy is hitting the brakes big-time and Brownie's mind starts working. Surely now is the time to be able to offer cost-effective alternatives to small business (I avoid large companies these days - but that's another story!).

Hence my learning Linux and the reasons for wanting to set up Linux based networking that will give customers what they need, replacing SBS in some cases. I also have a customer who is about 6 months away from needing to move away from simple computing (i.e a few individual PCs) due to business growth (yes, even during a recession - they offer psychology counselling, very big during periods of redundancies). I would love to be able to offer a linux-based solution :)

So, coming back to the subject, I was curious as I have, for many recent years, been a windows user and then a windows administrator. However, I used to be a techie back-when, and I do remember the first Macs and Win 3.1 - and I was very uncomfortable with guis :o

Things change though and I probably find myself in the enviable position of having experience of the two different environments.

Sorry to rant-on, and feel free to ignore me :o

Just thought it may explain things a bit and put into context my various questions on this forum. ;)


BTW, I am not belgian!

saikee
04-25-2009, 08:06 AM
To me, this (CLI) is the key to Linux

as quoted by blackbelt_jones is also my explanation.

A prograrmer should have no illusion that every function at the desktop is a code done with a text terminal/screen. Thus the CLI is the building blocks of the entire operating system.

Modern Linux does not require a user to be knowledgeable or even able to use a Bash terminal. This is identical to every M$ Windows user having a Command Prompt at the "accessories" menu but never have a need to touch it unless he/she wants to.

I don't see a modern Linux in performance any way different to a M$ system as far as the desktop is concerned. The difference is that Linux has a much more powerful CLI because everything that a user can do with a PC is available. The knowledge is in the public domain due to it being open source. Nothing is held back but continuously improved on. Linux is based on Unix that has a rich set of terminal commands well established in the early mini computer systems.

In a proprietary system it would not be in the vendor's interest to publicise the inner working of the system so various restrictions are imposed or basic facilities are not made available. Therefore a PC user will find the Linux's CLI a heaven for doing anything not provided in the desktop. That is not the case with a proprietary system. The CLI is gateway for controlling an operating system.

Therefore a user enjoys getting more out of an operating system will naturally use the CLI. He/she will find more freedom with an open source system than a proprietary system. GNU/Linux is currently the most popular open source system.

kiel
04-25-2009, 06:25 PM
MERFF!!:eek:

ever since ive been running sabayon, i have found command lines to make allot of sence, and gui's a couple time have had a tendency to hose up/freeze up, altho im just learning, i like the "equo search --packagename"
"equo install --packagename"
"equo update"

some of the package managers are good and what not but, seems like you spend more time looking up the software, then doing a simple command search, for me it kills time to use the command for installation, with all 50 of the sections of where the packae could be hiding I can find it with a simple..

"equo search --packagename"
"equo install --packagename"

Im rather new to linux, played with it alot on vmware, but I havent gone back yet, and my soon to be wife asked me the other day If I would remove her xp and put my linux on it, she likes the no spyware/virus bull$hit

blackbelt_jones
04-27-2009, 01:50 PM
May I say again, for emphasis:

It's not about one tool being better than another tool. It's about two tools being better than one tool.


And may I say once more, for emphasis:

"It's not about one tool being better than another tool. It's about two tools being better than one tool!"



Thank you very much:)

loopback48
04-27-2009, 06:12 PM
I know many that use the GUI only. No shame in that. But for me, old habits die hard. I still use the CLI. And I agree with BlackBelt, It's better to have two tools. I've had to use the CLI when X did not start up. Can't shoot trouble any other way.

Two is better than one. Or as an old song said: One is the loneliest number in the world.