Command line on Linux: Pro or Con?


Recommended Posts

Saw a post or two in this thread that decried the terminal or command line on a *nix box as some horrible thing.

Actually, I have grown to really appreciate its advantages.

  • I can post a command or two in the forum, and the person that needs it can highlight with a mouse, and middle-click in an open terminal to get the exact command. You can't do that with a set of Windows instructions (or instructions using a Linux GUI, either).
  • Output of a command (for an error log or such) can be posted in a forum and searched
  • Posted statuses and such from above use up less much less bytes than the graphical equivalent while also often giving more information.

For example, to check partitioning information on a Linux box, I would ask someone to post the output of a

fdisk -l

command. They would be able to post the results, like so:

Disk /dev/sda: 146.8 GB, 146815733760 bytes
255 heads, 63 sectors/track, 17849 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot	  Start		 End	  Blocks   Id  System
/dev/sda1   *		   1		  13	   97656   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2			  13	   17850   143277083+   5  Extended
/dev/sda5			  13		 254	 1937499+  83  Linux
/dev/sda6			 254	   17850   141339583   83  Linux

which shows a good amount of detail, and you can even see that there is a problem because partition 1 (1-13) overlaps the extended partition 2 (13-17850).

Simple paste of one command, and copy/paste results that can be reviewed.

In Windows, to see partitioning (using the sample XP box I am supplied here at work), I would have to say:

  1. Click Start, "Settings", select control panel
  2. In the control panel, click Administrative Tools
  3. When you see your admin tools, click Computer Management, and the management tool will open
  4. In the left pane, find "Disk Management" and click it.

and those instructions will get you to something that looks like this:

post-36818-1226591304_thumb.png

While it looks nice, it does not show the type of detail that will find an issue of overlapping blocks like posted above. Larger image. Less informative.

Having a terminal to use isn't such a horrible thing, in my opinion. As long as there are also GUI tools for people to stumble through, if they needed to (in the case of the above example, gparted does quite nicely on Linux).

The best of both worlds, if you ask me.

Link to comment
Share on other sites

Don't have nothing against GUI's, but am all about the advantages of the command line too. A system that provides the combination of both is the way to go.

The terminal allows to do fast tasks without having to run a GUI program, wait for it to load and then execute that same task, that by now would have been done with a simple command.

How about bash scripting? There's so much you can do with a bash script made by yourself for a specific task. Same task could take ages to do in a program, such a file browser for instance.

Link to comment
Share on other sites

command line is the best feature !

it allows you to create batch scripts that can be scheduled etc. And as you pointed out, you can get a lot more information than you can in a gui.

Unix got one thing right when they decided to build all the system tools in small efficient stand alone applications that can be linked to give out results that the authors might have never imagined. That can't be done with a gui

Link to comment
Share on other sites

>Diskpart

DISKPART> select disk=0

Disk 0 is now the selected disk.

DISKPART> list partition

Partition ### Type Size Offset

------------- ---------------- ------- -------

Partition 1 Primary 298 GB 34 KB

or

DISKPART> list volume

Volume ### Ltr Label Fs Type Size Status Info

---------- --- ----------- ----- ---------- ------- --------- --------

Volume 0 E DVD-ROM 0 B No Media

Volume 1 G 20061111_21 CDFS DVD-ROM 559 MB Healthy

Volume 2 F DVD-ROM 0 B No Media

Volume 3 D 320GB NTFS Partition 298 GB Healthy Pagefile

Volume 4 C Primary NTFS Partition 69 GB Healthy System

DISKPART>

I appreciate a good command line, I use Linux servers with CLI only and no GUI (Security)

But on Windows its possible to get to the innards with CLI, just need the know how

Link to comment
Share on other sites

I appreciate a good command line, I use Linux servers with CLI only and no GUI (Security)

But on Windows its possible to get to the innards with CLI, just need the know how

on windows the CLI isn't as powerful as in unix, you can't pipe etc

also the tools provided by MS for the CLI are lacking, they improved with Msh (the MS shell....might be called something else now...) but last time I used it, it felt heavy (took a long time to start etc ) and that's not what a CLI is supposed to be

Link to comment
Share on other sites

Imo -

Pro's: Can't disagree with anything already said. It's just so useful for complicated and mundane tasks.

Con's: It's a command line. If all you know about how to use a computer involves a point-and-click GUI, then a command line will stop you dead. A blinking cursor. It's in no way friendly and it doesn't give you any clues as to what to do next. There are no tooltips, and there are no buttons to click. I think it's a psychological thing. I think some people associate it with some kind of low-level access that, if you type the wrong thing, will render your computer completely inoperable. It requires knowledge of a language of abbreviated commands and, for file operations, a mental picture of the layout of the directory structure. None of which is required in a GUI, because it's simply drag-and-drop.

Those who know, know that it is good. Those who don't know view it with suspicion and disdain.

Link to comment
Share on other sites

Command line is great for advanced and expert users, but say when average Joe gives Linux a try (which 99% of them won't do), but hypothetically let's say they install Ubuntu using Wubi. If they ever see the terminal, they will instantly start to freak out. The average Joe/Jane's need a GUI. Sure, some things maybe faster in command line, but you have to understand what you use is not suitable for others. This is why I hate Linux ###### who tell you to do everything in the terminal.

Link to comment
Share on other sites

i don't know what it is about *unix but i am not really a fan of any sort of gui that has some out with any sort of the builds (other then OSX). It's all about terminal for me :)

Link to comment
Share on other sites

Command line is great for advanced and expert users, but say when average Joe gives Linux a try (which 99% of them won't do), but hypothetically let's say they install Ubuntu using Wubi. If they ever see the terminal, they will instantly start to freak out. The average Joe/Jane's need a GUI. Sure, some things maybe faster in command line, but you have to understand what you use is not suitable for others. This is why I hate Linux ###### who tell you to do everything in the terminal.

The truth is that 99% of Linux "######" DO use the terminal or command line for most/everything!

Link to comment
Share on other sites

... This is why I hate Linux ###### who tell you to do everything in the terminal.

Wow.

It just seems that even a new user would prefer copy/paste of an instruction over a listing of steps on which app to select. What tab to select on that app, select "advanced", then a few options to set. There are times where a copy/paste command is quicker and more painless than firing up a GUI app.

And what is this about "everything"? I certainly said in my first post that having a GUI alternative is good for those who may be unfamiliar but want to muddle through menus and such themselves.

Surely, in the case of partition data that I used as an example, you could at least agree that it would be easier to paste that one line in a terminal (no typing even needed!) than to follow the steps to start up the app and get partition data to display.

If you still think that what I showed is quicker and easier for the GUI part than the cut and paste of the command... Then I will let you call me a "Linux ######".

EDIT: Weird, the plural "######" is not filtered. But the singular term "*******" is.

Link to comment
Share on other sites

Command line is great for advanced and expert users, but say when average Joe gives Linux a try (which 99% of them won't do), but hypothetically let's say they install Ubuntu using Wubi. If they ever see the terminal, they will instantly start to freak out. The average Joe/Jane's need a GUI. Sure, some things maybe faster in command line, but you have to understand what you use is not suitable for others. This is why I hate Linux ###### who tell you to do everything in the terminal.

With you being tsu, tsu, tsupersonic! it would be expected that you would like to have things done as quickly as possible, tsupersonically i mean. Command line allows you to do just that. :)

Link to comment
Share on other sites

definately a pro, that's the only thing what i miss in windows

i really wish you could do things like that in windows, thats another reason why i love osx. You get the best of both worlds.

Link to comment
Share on other sites

although I've been lacklustre in learning the CLI, I'm steadily growing fond of its structure and how it lets the user operate.

I use to be scared of the CLI but this is changing. Nothing changes without my consent this is one of the advantages I think is a key pro in having CLI.

Link to comment
Share on other sites

With you being tsu, tsu, tsupersonic! it would be expected that you would like to have things done as quickly as possible, tsupersonically i mean. Command line allows you to do just that. :)
Maan, that was so corny.
Link to comment
Share on other sites

I like using the command line, its usually faster than a GUI based method.

but i mostly only use it for automated stuff, like batch files or scripts anyway, except on linux, i probably use the CLI more than the GUI on linux. I'm not particularly fond of the linux GUI's ive tried so far :p

Link to comment
Share on other sites

i really wish you could do things like that in windows, thats another reason why i love osx. You get the best of both worlds.

true, i used to think just like that, but

i have linux boxes for everything i need linux for, and win desktop for browsing/casual gaming/watching videos etc. in result i don't have to buy overpriced mac hardware (yes, i know about hackintoshes, i'm too lazy for that) plus i can upgrade whatever components i need without problems plus i can run software the rest of the world does.

i could afford a mac, but -- i don't like the idea of sticking it up my ass when a new one comes out.

Link to comment
Share on other sites

I like using the command line, its usually faster than a GUI based method.

I figured it was just my computer being slow, but yes I agree, it's much faster for me if I know what I'm doing. Major con though is that anyone new to Linux is going to be terrified at first if they've never used anything like it before. (I still worry about breaking things...so far so good though!)

Link to comment
Share on other sites

Well, in Debian based systems, apt is a great way to download, install, or remove things. But also is Synaptic (GUI front-end). Other commands are great for CLI. It all depends what you want to use..... each to his own!

Weird, the plural "********" is not filtered. But the singular term "*******" is.

Now it is..... ;)

Link to comment
Share on other sites

Definitely pro CLI. For many tasks it is much more effective than a GUI.

I can see why Joe User would be terrified by having to use a terminal window; for professional users like most of us here it shouldn't be a problem. If you can't figure something out - RTFM.

Link to comment
Share on other sites

I personally prefer the terminal in some ways. Even though I can use graphical utilities in Fedora to un/install software, I always prefer this command...

yum -y install <insert package name here>
Link to comment
Share on other sites

It's not just CLI, but all the programs you can use there, and the fact that everything on linux is a file and can be accessed as such. Even if you had a decent CLI on Windows it would be near useless as almost every Windows program is GUI only and info is stored in binary containers, so I understand why lots of Windows users don't realize the amount of stuff you can do with the CLI on linux/unix.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.