Two most popular ways to interact with a computer are the Command Line and the GUI
(Graphical User Interface). Command line is a text only interface, while GUI is an Interface,
composed of graphical symbols. Most of the times, all the general tasks performed using a GUI
can be performed by a Command line and vice versa (although when it comes to advanced
tasks Command line may be the only option).
What is a GUI?
GUI (pronounced gooey) is a type of interface that allows users to communicate with operating
systems in the form of images/animations/audio as opposed to text. This interface presents the
user with the information/actions available through graphical objects (like icons). Both mouse
and keyboard can be used for the interaction. The user performs actions by directly
manipulating graphical objects on the screen.
What is a Command Line?
Command Line (typically known as Command-line interface/interpreter or CLI) is a mechanism
that allows interacting with the computer operating system by inputting (typing) commands.
This is a text only interface, which only requires input from the keyboard (usually referred to as
“entering a command”). Typically, Enter key is pressed at the end of a command, after which
the computer will receive, parse and execute that command. The output of the command will
be returned back to the terminal as text lines. Output may include a summary of the task and
the actual result as well. To insert command in a batch mode, user can use a script file. A script
is a file containing an ordered sequence of commands that will complete en entire job.
What is the difference between a GUI and a Command Line?
Most command line interface tasks only require the keyboard, while GUI systems require both
the mouse and the keyboard. Therefore, command line users usually do not have to switch
their hands between two places. And command line interface usually requires just few lines of
code to perform a complicated task. Command line definitely uses fewer resources than a GUI
system as a GUI system will load icons, fonts, I/O drivers and other resources. Because of these
three reasons, command line users may be able to complete most tasks relatively faster than a
GUI user. Command line users can create scripts and save time, while GUI users can do the
same with facilities such as creating shortcuts.
Although new users might have to learn how to operate the mouse, GUI is easier to pickup than
using the Command line. Unlike GUI, Command Line users need a fair amount of familiarity and
need to memorize a number of commands in order to get their jobs done smoothly. But, a
command line user has much more control of the file and operating system. And for performing
some advanced tasks, command line may be the only option (sometimes). GUI systems
inherently make it easy to multitask, by providing graphical means of monitoring several things
(process) at once (many command line environments offer multitasking, but it is harder to view
several things at once).