LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   What's with the command line? (http://www.linuxquestions.org/questions/linux-newbie-8/whats-with-the-command-line-486877/)

buckdog 09-25-2006 04:14 PM

What's with the command line?
 
I am an uber-noob, but am wondering why doing so much stuff in linux uses the command line.

Thanks!

acid_kewpie 09-25-2006 04:18 PM

it gets stuff done quickly and easily once you are familiar with it. a 5 second console command can easily take minutes clicky here clicky there. and plenty of things can't be done at all.

haertig 09-25-2006 05:37 PM

A Windows-style GUI is good for leading you through a task that you don't really know how to do in the first place. Enough clicking, and you'll probably find what you need. You basically stumble onto it because you are familiar with the interface. This is good for things that you rarely do and need some guidance. It is also good for complex tasks involving graphics. I'm posting to this forum using Firefox - a GUI browser. And I can't imagine trying to remove the redeye from a photograph using commandline only.

If you know what you want to do, and how to do it, the command line is much more powerful and faster for many tasks. Requires a lot less of the system also (CPU, memory, etc.) This is good for the stuff where you don't need the hints and prods that a GUI can provide. Much of the stuff many of us do with Linux doesn't require a GUI, although under Linux you can find an optional GUI-wrapper for just about anything if that's what you want. K3B is a great example of a GUI-wrapper for the basic commandline stuff like mkisofs, cdrecord, growisofs, etc.

pixellany 09-25-2006 07:28 PM

In the beginning (Apple-II, commodore, DOS, etc.) we had nothing BUT the command-line. It is only in the last 10-15 years that people have come to believe that the GUI is the only way to run a computer.

In the better Linux Distros, most of what you need to do on a daily basis CAN be done in the GUI. But it is generally easier using the CLI.

hand of fate 09-26-2006 11:04 AM

Quote:

Originally Posted by pixellany
But it is generally easier using the CLI.

I'm sure a lot of people would disagree with that statement!

pixellany 09-26-2006 12:58 PM

Quote:

Originally Posted by hand of fate
I'm sure a lot of people would disagree with that statement!

This is one of those things that are very dependent on how the question is asked....

If you are totally unfamiliar with the CLI, then it is harder to get something done.

If you spend ~ 4 hours learning a few basics, then certain things are easier at the CLI.

Here is an absurd example: Apple-II, circa 1980, proceedure to start the word processor:
1. turn on the computer
2. type "write" at the prompt

Show me any modern computer that will start up as quickly or reliably to do a specific task.
Show me a person who could not learn those two steps, but who CAN do a custom desktop configuration in a modern GUI environment.

We perceive as "easiest" that which we are most used to......

extrasolar 09-26-2006 01:34 PM

Quote:

Originally Posted by buckdog
I am an uber-noob, but am wondering why doing so much stuff in linux uses the command line.

Thanks!

Because that's what Linux is; you could ask the same question about MS-DOS.

Seeing as you're an "uber-noob" I believe you haven't fully grasped the concept of how Linux works. Given time, I guarantee that you'll be asking "Why is so much done using the GUI".

Enjoy Linux. :)

acid_kewpie 09-26-2006 01:37 PM

totally, and the other major factor is a learning curve. yes you need to know more to use a CLI than to use a GUI, but once you put in that initial groundwork you can very easily reach much higher levels of ability and convenience, all for the sake of eye candy.

And i'm not saying this is windows vs linux at all either. I come across so many areas of it where a product will present a web and console interface. in the first instance you play around here and there with the web interface to try things out, but time nad agin i gravitate back to the cli as i know and trust what is going on, and i can get the exact results i want a LOT fast, be it a linux box, a cisco switch, a packet shaper, and IDS appliance...

acid_kewpie 09-26-2006 01:45 PM

Quote:

Originally Posted by extrasolar
Because that's what Linux is; you could ask the same question about MS-DOS.

Seeing as you're an "uber-noob" I believe you haven't fully grasped the concept of how Linux works. Given time, I guarantee that you'll be asking "Why is so much done using the GUI".

Enjoy Linux. :)

Actually there is another angle here that may be being observed. as Linux is so different, and there are so many ways it can behave in the gui circle inparticular, it is not always a good environment for achieving a certain goal via documentation. I fscking hate KDE, i fscking hate debian. i am anot about to tell a debian/KDE user how to navigate their pointy clicky world that i don't know to achieve menial tasks. as long as you're not going too fasr into debians "twists" i can however tell you how to do that very simply here on LQ via a gui. which is easier to read...

1) right click the flashy thing in the task bar
2) select "wobble" from the menu
3) click the X to get rid of the annoying avatar
4) click the "squidge" tab
5) expand the tree and select the "flurp" option
6) click "report" (or "go" on some older versions - or "now" on version 32.2f)
7) complete

or

1) open a console
2) run "flibblety -abc"
3) complete

you mightn't understand the second as easily, but it'll sure as hell answer your problem and get you the answer you want.

this logic also applies heavily to software developers. they are all geeks, and so write installation guides at their own level, not least because the methods used at their level haven't changed in 10 years and work across nearly every system. there are bits and bobs in fedora or other things which only hang around for a single release, but then that's irrelevant for anyone not using fedora anyway.

mrclisdue 09-26-2006 03:31 PM

I use Gnome, and there's always a terminal open.

To kill a running process:

GUI: System>Administration>System Monitor....wait for it to open....find the running process....highlight (or right-click)....end process....wait for it to end....oops, only root can terminate....um, now what?

CLI: su -; pwd; pidof process; kill -option pid ...next.


cheers,

acid_kewpie 09-26-2006 03:36 PM

Quote:

Originally Posted by mrclisdue
I use Gnome, and there's always a terminal open.

To kill a running process:

GUI: System>Administration>System Monitor....wait for it to open....find the running process....highlight (or right-click)....end process....wait for it to end....oops, only root can terminate....um, now what?

CLI: su -; pwd; pidof process; kill -option pid ...next.


cheers,

here's another one for you
Code:

man pkill
:D

haertig 09-26-2006 06:25 PM

Quote:

Originally Posted by acid_kewpie
i am anot about to tell a debian/KDE user how to navigate their pointy clicky world

;) As a Debian user, my pointy-clicky world is pretty much limited to three icons in my Gnome panel - "New Terminal Window", "Firefox", and "Thunderbird". Of course I'll run other GUI programs, but not all that frequently.

---

Debian (or any distro) does not preclude CLI. If I want to create a new account, useradd is my choice. If I want the burn a CD/DVD, it's mkisofs/cdrecord/growisofs rather than K3B. A new startup script? vi /etc/init.d/xxx and manually symlink to the /etc/rcX.d directory I'm targeting. Just because Debian comes out of the box with "easier" ways does not mean anyone has to live and die by them.

But I can't imagine brain-bashing myself trying to browse LQ.org using only wget and vi from the command line. lynx would be better, but still a tad tedious!

You can use distros both ways - CLI or GUI, as you see fit (assuming X is installed). Which knowledge/experience do I value more? CLI. No doubt about it. I can use it anywhere ... it's not distro-specific (for the most part). It's no big deal to flip over to one of my Solaris accounts either. CLI is CLI, with only minor adjustments as you hop between *nix OS'es.

jstephens84 09-26-2006 06:41 PM

Just my two cents but I think alot of sys admins find that mangement through cli is easier. Especially when the machine is say at another property or could just be a network server. It is easier to make a ssh connection to the server and run a couple of commands then to get up, walk to the server, find the right application, open it, and then do the same function.

nflenz 09-26-2006 10:03 PM

"The X server has to be the biggest program I've ever seen that doesn't do anything for you."
- Ken Thompson

Matir 09-26-2006 11:36 PM

And a lot of it has to do with developers as well... honestly, many developers are just too lazy to add a GUI... the CLI gets the job done for them, so why write a GUI? In many cases, a GUI would have more code than the code that does the work.

Also, some things just don't make sense in the GUI paradigm... take pipelined commands... in the GUI, it's hard to connect tools together to make the 'bigger' tool.


All times are GMT -5. The time now is 02:25 AM.