Command Line Interface vs Graphical User Interface

I’ve been thinking about this. Which is actually more efficient, in various metrics?

WORKING EFFICIENCY
For applications where you need a lot of visual feedback, such as computer games, video/graphics/sound editors, it appears to me a GUI would be more efficient, simply because a GUI is more suited to display lots of irregular information.

If you need to deal with textual data, then the CLI becomes more efficient. This becomes especially valuable if you need to do administrative tasks, coding, or word processing.

LEARNING CURVE
Contrary to what’s expected, the CLI is easier to learn (source: tried to explain GUI to my father (a complete digital illiterate), he did not understand it) and the learning curve is a lot smoother, although there’s more to remember (commands, key-press combinations).

A GUI is a very complex user interface. Even when it contains just one button. To a digital illiterate there’s just a bunch of images on screen. Opposite of this, a CLI is predictable: text appears where the cursor is located and the feedback is 99% of the time text. The input of the CLI is also very simple: the keyboard is a bunch of (over 90) physical buttons. Press a physical button and the corresponding character appears on the screen and the “Enter” key tells the computer to do the command you just typed. Simple.

Contrary to the GUI. Even with touch screens it’s difficult. What does what do? Where and when can I perform which action(s)? To us this may seem apparent, but ask any digital illiterate and they’ll tell you computers are difficult.

To make matters even worse, they have probably been told Windows is “easy” (it’s everything but) by their “technical” family member and the command line is for experts only. “Yeah, well, about that Linux thing… let’s not do it.”

When the digital illiterate struggles with the GUI, what must they think of the CLI when they see their family members use the GUI with impunity, and see that one “expert” entering what to them is the equivalent of dark magic on the CLI?

PREDICTABILITY
The CLI has a very predictable way to respond: everything appears below one another. Eventually the user is entering text at the bottom of the screen, and will always stay there, unless they take deliberate action to clear the screen.

Contrary to this, the GUI doesn’t have a clear way of inputting information. Where do you need to be on the screen now? Where is the output of the program? What does which image mean? It’s not always clear what type of task a particular widget (GUI element) fulfills. Sometimes it’s not obvious certain actions allow for further actions. An example here being selecting text and setting all of it to bold.

Thoughts? Did I miss anything?

3 Likes

Hi @xahodo,
With respect, I dis-agree with you. I am not an Linux administrator, I do not work with a server. I am a home user. I know how to use the CLI and I am not afraid to use it. But there may be weeks go by that I do not use it. Just about everything I do with my Linux PC, I do thru a GUI.

2 points.
Windows - just about everything you need to do can be done thru a GUI.
Cell phones - Everything is done thru a GUI.

I actually believe Linux would be more popular if the need for CLI could be removed for the home user. When I installed Mint, it was done completely thru GUI. When I backup Linux, it is done completely thru GUI, Clonezilla.

Thank goodness there are people like you who know CLI inside and out. I have deep respect for your knowledge and skills. It is people like you that are able to resolve problems and answer questions about Linux.

I remember when the home PC first came out. Someone who know the DOS commands and how to use them would be called “Wizards”. Today’s wizards are the CLI guru.

PS. I know most user will dis-agree with me. :smiley:

7 Likes

SuSe has Yast.
It’s almost as almighty as terminal in Debian. :wink:

I partially agree @xahodo.

CLI is extremely powerful and flexible for repetitive/automated tasks.
But a GUI is more “natural” to use.

I use CLI not daily, but about 3 or 4 days a week, as I run my own servers, which do not have a GUI.
On my laptop/desktop I use 99% GUI, but sometimes it’s easier to shellscript something than doinf ithe via GUI.
I admit, these are usually sysadmin tasks.
Say I move the pictures, documents, videos, etc… folders for a given user to a different directory, mounted in a sub dir at /home from a different partition, and after that put a simlink into that users home pointing to his/her documents, etc…


#!/bin/bash
userdirs=("Dokumentumok" "Letöltések" "Zenék" "Videók" "Képek")

if [  -d /home/$1 ]; then
echo "/home/home-ext/$1 létrehozása..." 
mkdir /home/home-ext/$1
for thedir in ${userdirs[@]}; do
  echo $thedir
if [ ! -L "/home/$1/$thedir" ]; then
echo "Még nem link: $thedir --> home-ext/$thedir" 
 mv "/home/$1/$thedir" "/home/home-ext/$1/$thedir"
 
 echo "linkelés..."
 ln -s /home/home-ext/$1/$thedir /home/$1/$thedir
fi
done

if [ ! -L "/home/$1/Nyilvános" ]; then
echo "Még nem link: Nyilvános --> home-ext/Public" 
 rmdir /home/$1/Nyilvános
 echo "linkelés..."
 ln -s /home/public /home/$1/Nyilvános
fi
chown $1:$1 /home/home-ext/$1 -R
chown 770 /home/home-ext/$1

else
echo "$1 nincs meg"
fi

This is harder to do via GUI, and easy to screw up :smiley:

So yes, sometimes CLI is really much more effective, and GUI looks always more comfortable, even if it is not that comfortable…

2 Likes

I like it.
Can I add two points

  • documenting how to do something on a GUI is difficult but not impossible. It is best done using images. There are no man pages for GUI actions … it is supposed to be intuitive.
  • for system work, it is preferable to use CLI because you can keep a record of every
    action by using the script comnand. You need that to be able to go back and fix mistakes.

Lets be fair, both gui and cli have their place.
and
today one rarely uses a ‘pure cli’ , the cli has become one part of the GUI… it can be a small or a large part , depending on the users preference… or even invisible as @easyt50 was suggesting.

4 Likes

I am with howard on this one.

Personally I prefer to use grapical images, a picture says a thousand words.

When installing for a client I always remove the option of seeing the command line, from the bar, menu or configuration panel. I then use it only if the system fails for any reason and I need more access.

Had a guy in a few weeks back, had installed 4 copies of mint on his 4 computers, did the same on each switched off terminal access as always. He discovered that right clicking on the menu allowed him to see everything, so he switched everything available on including terminal then started to play, ok no problem with thunderbird, that did nothing as he could not remember his mail passwords, no problem with most of control panel as its mainly colours screen displays etc…

But terminal was a nightmare, he got in but could not get out so kept trying different words, in desperation just switched off and brought it back, no idea what he had done so only answer to reset it all was reinstall the system and told him he pays to play.

One of those guys who knows everything !

3 Likes

I do not know the CLI inside and out. My skill at figuring stuff out is bigger, though. It also helps I have some decent knowledge about the possibilities, but I’m by no means a guru.

I just grew up with computers – I’m 49 now – and have seen people, digital illiterates, struggle with GUI. When I tried to explain things to them, I observed people were struggling a lot with GUI and there are really a lot more steps involved in getting something done with a GUI. Granted, most of these steps are obvious – and we therefore don’t even consider them – but to a digital illiterate a GUI is a disaster; I’ve seen it in my family.

if a GUI was harder to use than CLI - how did smartphone and tablet O/S ever get a foot in the door… There are labs all around the world, especially on the West Coast of the USA - trying to figure out intuitive ways for users to interact with digital technology - they have psychologists…

I think you’re wrong nearly everywhere… Sorry - but interesting thought experiment never-the-less - thanks for the informative viewpoint mate :smiley:

My computer journey started - first with programming BASIC to make my TRS-80 do anything useful. Few years later MS-DOS… Only about 18 months after being introduced to MS-DOS - I got access to UNIX… I love the power of the CLI - but - it’s nearly impossible to achieve anything if you don’t know what you’re doing…

Here’s another thought experiment :

Room full of chimps - with typewriters - how long to write a Shakespeare sonnet?

Room full of chimps with a GUI and computer - how long till one finds the right amount of “clickety-click” to achieve something? Recently watched a youtube of a chimp “doom scrolling” on social media…

I think the law of entropy would favour the GUI success rate…

2 Likes

There must be tricks to disable terminal use.
Who can come up with one?
How about set the users default shell to one that has no access to files.

1 Like

Fair enough.
Is easy to use the only consideration?
You can remember when the only way to use a computer was to learn to program … we have progressed beyond that… there are more tools than just a compiler today… is it the tools that make the gui, rather than the interface?

1 Like

Really depends on a lot of factors. Beginner vs Advance user. What is trying to be done. etc…

CLI requires knowledge of different commands. For the average user and what they use their computer for, it is much easier to point and click.

Try explaining how to send email with CLI

But I do hate trying to figure out what certain widgets mean. :thinking:

1 Like

Disable terminal is ok just remove icons or menus but ctrl plus t gets you to that point anyway

Dont want to remove it fully just make it not as easy to find

1 Like

Look up, which is the terminal program.
For me in KDE it is /usr/bin/konsole
It has execution right for everyone.
Chmod it to 750:
sudo chmod 750 /usr/bin/konsole

(Of course for you it will be something other depending on the DE)

With 750 it won’t be executable for everyone, only for the owner and the group (which is root by default).

Probably I’d add a group for “terminal users”:
sudo groupadd termuser

Chown the terminal emulator:

sudo chown root:termuser /usr/bin/konsole

Doing so the root will have full right on it, including execute, the group members of termuser will be able to execute it. Because of the zero in 750, whoever is not root or not member of termuser, will have no access to it, thus won’t be able to execute it.

Add your user to the termuser group to allow using th terminal:
sudo usermod -a -G termuser the_user_to_allow_terminal_usage

(Homework: how to do this all on GUI only?)

3 Likes

I prefer the CLI whenever possible ,especially for updates ,be it that some apps can only be freshly installed and updated via a GUI .

Frank in County Wicklow Ireland

4 Likes

We used to do it. There is a program called mail, plus some newer variants called pine and mutt.

You could do things like
grep mysearch *.txt | mail nevj
Try mailing the output of a program with the gui… that may be difficult… I have never tried.

2 Likes

This isn’t what you’re referring to, but for troubleshooting purposes we often send mail manually using CLI.

telnet mail.example.com 25
ehlo
mail from: pat@me.com
rcpt to: you@example.com
data
subject: test email
this is a test
.
4 Likes

All I meant, was for the average computer user the gui is more simple to use than CLI for sending email. -my opinion :wink:

$ echo "Sending email from CLI can be done" | mutt -a extra.doc -s "From CLI" -- jdoe@johndoe.com

Something like that- It has been a while.

4 Likes

been putting output of files and cronjobs in email ~25 years or so…

it’s straightforward if you have the muscle memory… easy…

Ran into an issue recently where a Linux server I deployed is unable to send email outside of the organisation : e.g. :

echo "this is a testmail" | mailx -s "testing testing" -r sysadmin@$DOMAIN user@$mailaddress

Never gets there… Other servers I manage in that ENV can do it - why not this one? Queried one of my colleagues, she sent back proof it works for her (bitmap screenshots of her PuTTY session) - but - she cheated - she telnet’d to port 25 on the mail relay and issued the standard HELO or “ELOH” commands and RCPT etc - and it got sent, and delivered.

I think there’s something the $MAILRELAY host (it’s an internal CNAME DNS entry for an exchange server - I think) refuses to do because it has some rule where it doesn’t know who I am and refuses to send… But 'cause it worked for her using telnet to port 25 - that’s proof it works?

Once upon a time - mail relays were all UNIX - I managed some of them… What a headf–k managing obtuse “cf” files, and make files (“mkalias” WTF?)… I’m still surprised they allow telnet to port 25 and issue mail commands… Favourite trick of spam relays…


The true beauty of the the CLI - is it’s scriptable and repeatable (VS GUI).

I have a very vague memory of a thing in Windows 3.0 called “macro recorder” it could record your “clickety click click [ad nauseam]” task and replay it… That died an ignoble death and I’m sure nobody misses it :smiley:

2 Likes

I love that.
Use scripts all the time.

4 Likes

I guess, Auto Hot Key is something similar, isn’t it?

Me too :slight_smile:

3 Likes

We used something called Autokey or something similar to do that. It would stuff the keyboard buffer with keys and replay “macros” you defined to run at particular times. We used the heck out of that.

Edit: Pretty sure it was called Automite.

2 Likes