Register a domain and help support LQ
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 03-29-2012, 02:23 PM   #1
LQ Newbie
Registered: Feb 2012
Distribution: Debian, Fedora
Posts: 24

Rep: Reputation: 0
Why use command line

My friend is just learning linux and is still struggling to understand why you would want to use a command line interface instead of a GUI (He didn't seem to like vi very much).

My main argument was that in a server environment a gui is unnecessary.

But, I'm sure there's plenty of people here that have some strong arguments in favor of a command line interface. Do you have anything I can tell my friend?
Old 03-29-2012, 02:26 PM   #2
LQ Guru
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295

One of the greatest advantages that pops to mind is that when you launch an application from within the GUI menu and it errors out it might hide error information from you. If you launch that same application from the command line, not putting it in the background and not redirecting anything you can see a lot more information on what's going on. That's just one, I'm sure other users will provide you with a lot more arguments.

Kind regards,

1 members found this post helpful.
Old 03-29-2012, 02:39 PM   #3
Senior Member
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
First of all, you don't have to like 'vi' just because you use the terminal.
Personally I love the terminal & I hate vi - probably because I never learned it!

What's good with terminal:
You do things fast & accurately, from one single place you have everything at your fingertip!
Issuing a command is so much faster than pointing & klicking through a GUI. Also you have a command-history to show what was previously done, seldom present with GUI:s.
- But of course, you must have knowledge, if you know "nothing" you need to "have a look" so to speak.
Think of a computer as a restaurant:
When you go to a restaurant, do you need a pretty menu?
- Yes, if you're seldom there and don't know what they've got.
- No, if you're often there and already know what's on the menu.

Also, consider this:
If you need to guide someone, let's say "how do I move my jpeg-files from one directory to other directory?"
* GUI-explanation:
Open konqueror ("explorer"), click yourself through the directories until you reach the target, right-click, select "*.jpg", right-klick, select "cut", move to destination, right-click, select "move here" (taken from memory this, please don't hang me!)
* Terminal:
# mv target-directory/*.jpg destination-directory/
Seems a bit easier, doesn't it?
Old 03-29-2012, 02:45 PM   #4
Senior Member
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
And I would like to add:
When I use my computer for work or leisure I almost always use GUI:s. (After all, games like Civilization are pretty useless without GUI if you ask me, creating good looking broschures is easier with GUI-apps as you can then see what the broschure actually will look like, etc).
But when I need to configure system, when I administrate servers, or when a GUI-app doesn't work ( like EricTRA hinted ) then I use terminal. Quick -fast - informal. NOT beautiful (who cares, I am!
Old 03-29-2012, 02:48 PM   #5
Senior Member
Registered: Jul 2004
Location: Skuttunge SWEDEN
Distribution: Debian preferably
Posts: 1,350

Rep: Reputation: 127Reputation: 127
Oh yes, one more thing:
You can do a lot more with terminal than with GUI!
Just check out "man mplayer" - it gives you (very roughly) 2000 cli-options.
Try to put that in a GUI...
Old 03-29-2012, 02:50 PM   #6
Senior Member
Registered: Feb 2009
Posts: 4,140

Rep: Reputation: 1159Reputation: 1159Reputation: 1159Reputation: 1159Reputation: 1159Reputation: 1159Reputation: 1159Reputation: 1159Reputation: 1159
Command line is preferred on the forums because some of us are using Ubuntu with Unity, some of us are using Slackware with KDE, some of us are using CrunchBang with Openbox, and so forth.

Command line is the "lingua franca" for us all to communicate and help each other.

But you can tell your friend that in his everyday activities (web surfing, word processing, games, etc.) he probably never needs to use the CLI, and that's OK.
1 members found this post helpful.
Old 03-29-2012, 02:53 PM   #7
LQ Addict
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 6,321

Rep: Reputation: 1728Reputation: 1728Reputation: 1728Reputation: 1728Reputation: 1728Reputation: 1728Reputation: 1728Reputation: 1728Reputation: 1728Reputation: 1728Reputation: 1728
It seems that Microsoft have decided that the terminal is the way to go too, since their newest server offerings are geared towards the command line for configuration.
Old 03-29-2012, 02:57 PM   #8
LQ Newbie
Registered: Mar 2012
Distribution: Redhat, Solaris, AIX, HPUX
Posts: 8

Rep: Reputation: Disabled
GUIs certainly have a place - on a single user system that needs a simple control system or where graphics are needed - as you say games, publishing etc would all be pretty tough without a GUI. Lots of people prefer GUIs as they are far more intuitive to use and provide a visual metaphor for working with files, applications and so on.

In saying that, command line certainly has a place too. I work for a very large bank and my little team (one of the smallest in the bank) manages around 1000 servers - mostly Red Hat and some legacy Solaris, and we are just a tiny percentage of the overall bank. There's just no way we'd want to try to manage that many server with GUIs. By using command line tools such as ssh, shell scripts, perl, and so on, we can successfully keep a handle on our estate, monitor for problems and perform maintenance and upgrades in a far more effective way.

Ultimately it comes down to a mixture of personal preference and need. There's no "better" choice here, what suits me in one scenario might not suit you in another.
Old 03-29-2012, 03:06 PM   #9
Registered: Aug 2009
Location: /Universe/Earth/India/Pune
Distribution: Slackware64 -Current
Posts: 889

Rep: Reputation: 182Reputation: 182
Using command line is a 'part' of 'learning' GNU/Linux,BSD,UNIX.
Your friend can ignore it but can't escape it. Just my 2 cents.

Old 03-29-2012, 05:46 PM   #10
Registered: Feb 2003
Location: Florida
Distribution: Fedora 18
Posts: 862

Rep: Reputation: 90
When things go wrong I instinctively go to the command line. To me it is the way things get done. Of course the GUI is necessary for a lot of things but panic takes me to CLI every time. And there is a certain satisfaction knowing I can rip and burn a DVD without a GUI program. A lot of GUI programs are just frontends for using several command line programs at once without typing anything out. As EricTRA said an important advantage of the command line is if errors occur you can see immediately and that makes it a lot easier to know how to fix whatever is causing the error. Also if the GUI relies on a certain program to perform a certain task doing whatever it is doing and that program misbehaves you're out of luck, but with the command line you can usually find another program or a workaround to get that done.
Old 03-29-2012, 06:31 PM   #11
Senior Member
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Reasons to use the command line:
  • Command-line utilities generally expose more options in a more succinct way.
  • Automating tasks usually requires interaction with command-line interfaces.
  • Data processing is often a series of operations on textual data (not pretty images).
  • Remote administration can be performed without forwarding (larger) graphical displays across a network.
Old 03-29-2012, 06:57 PM   #12
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Or even simple things like a major change in ones network infrastructure. Imagine
changing IPs for 200+ clients in DNS & DHCP reservations via GUI.

Let's give you (and your OS) the benefit of the doubt and say you can do one change
in 20 seconds using the GUI.

You'd be busy for the best part of 2-3 hours.

In the CLI (assuming you use bind9 & ISC dhcpd) it would take me about 2 minutes
of contemplation, two sed commands typed up in ~ 30 seconds, and a service restart.
Saved 1:57h ... that's why CLI rocks your socks ;}
2 members found this post helpful.
Old 03-29-2012, 07:05 PM   #13
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,260

Rep: Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328
I'd love to add something new to this, but all of the above pretty much covers it

Certainly its traditional on serious servers (not just *nix) not to have a GUI installed, and of course in the earliest days there was no GUI, much like MSDOS before MSWin.

A rough guide is:
For a home desktop - GUI; for a serious (commercial) server - CLI; for a personal server - your choice.

For all of the reasons stated above
Old 03-29-2012, 11:07 PM   #14
Registered: Jul 2011
Location: Milky Way
Distribution: Ubuntu, LFS, Slackware, Fedora
Posts: 219

Rep: Reputation: 20
For a server, you need a lot of memory. GUI is wasting your memory.
Old 04-14-2012, 11:27 PM   #15
Registered: Sep 2011
Location: Philly
Distribution: Gentoo
Posts: 473

Rep: Reputation: Disabled
1. The command line is faster.
I cringe every time I have to use windows at work. Aside from being slow as hell, it's just a pain navigating the menus. Theres nothing more frustrating than hunting through menus when you know exactly what you are looking for, you just cant find it.
It's much easier to just type the name of the file and be done with it.

2. The command line is quite complete.
I don't like having programs on my machine I don't need. Understanding how to use command line programs can eliminate a lot of unneeded software. For example the 52k program dd can take the place of gigs of software if you know how to use it.

3. The command line is extremely powerful.
There are so many things that you can do in one command line that people pay small fortunes in gui software to do.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Cursor does not move to the bottom line and overwrite to same line on command line mesuutt Linux - Newbie 3 02-25-2012 09:04 AM
Print all PID folders from /proc line-by-line with this format (( PID: command-line )) courteous Linux - Newbie 7 12-12-2010 05:47 PM
awk command line: blank line record sep, new line field sep robertmarkbram Programming 4 02-21-2010 06:25 AM
xine command line? or some other command line only engine? lumix Linux - Software 2 08-10-2007 11:46 AM

All times are GMT -5. The time now is 04:07 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration