Skip to content

DA7. Compare CLI and GUI

Problem Statement

Read the following resource on GUI and CLI: https://www.section.io/engineering-education/comparing-graphical-user-interface-gui-and-command-line-interface-cli/

  • In your opinion:
    • Should operating systems have a GUI attached to them?
    • When is a GUI better suited to ---- what is the best use of a GUI?
    • When is a GUI not needed?

Solution

  • Operating systems are meant to facilitate communication between humans and machines. It does this using an interface that the user interacts with. The interface can be a CLI or a GUI.
  • Using CLI, the user interacts with the OS by typing commands. Using GUI, the user interacts with the OS by clicking (or interacting) on icons or other visual elements.
  • Every major OS provides both interfaces to the user. The user can choose to use either of them depending on the task at hand and his/her preference or familiarity with the interface.
  • The table below compares the CLI and GUI in a few aspects (Section, 2021).
Comparison factor CLI GUI
Ease of use Hard to learn. Hard to use Relatively Easy to learn. Easy to use.
Multitasking Easy to multitask. Difficult to implement multitask in one window, but easy to use.
Remote Access Easy to access remotely. Difficult to access remotely. Requires other programs to setup the connection.
Scripting Easy to script. Easy to script using helper programs.
Speed Fast. Just type the command. Slow. You have to do click all the buttons to reach a specific function
Control More control over the system. Less control over the system.

Should operating systems have a GUI attached to them?

  • Whether an OS should have a GUI or not depends on the purpose of the OS. If the OS is designed for a specific purpose, it may or may not have a GUI; but if it is a general-purpose OS, it must have a GUI.
  • Limited-purpose OSes like embedded systems, servers, etc. do not need a GUI. They are designed to perform a specific task and are not meant to be used by humans. They are meant to be used by other machines.
  • For example, a server is meant for serving data to requesters; in the case of a web server, these requesters are web browsers. Although the user is initiating the request, the server talks to the user’s machine throw HTTP (for example), and it does not interface with the user at all.
  • Another example is an embedded system that controls a Microwave oven. The oven usually has a display that shows some information or has buttons to click. The display may be a simple GUI that serves the purpose of the oven; which is different from the GUI of a general-purpose OS (Will G, n.d). Some embedded systems may not have a GUI at all.

When is a GUI better suited to ---- what is the best use of a GUI?

  • As mentioned above, a GUI is better suited for general-purpose OSes where its users may use the OS for a variety of tasks.
  • The best use of a GUI is to provide a user-friendly interface to the user in simplifying a very complex task (that may need a sequence of several commands to be completed) or to make such a task available for users who are not familiar with the CLI.
  • Sometimes, the Os’s GUI may determine its success or failure; a good GUI can make the OS more popular than it would have been without it.

When is a GUI not needed?

  • GUI is not needed for limited-purpose OSes like embedded systems, servers, etc. as mentioned above.
  • There is no need for a GUI os in a device that only will talk to other machines and not to humans. However, CLI is still needed to configure the device, troubleshoot it, control it remotely, etc.
  • Sometimes, building a GUI for a specific task may be more difficult than building a CLI for it. In such cases, it is better to build a CLI for the task. since the cost of maintaining a GUI is usually higher than that of a CLI.
  • For example, a CLI for a compiler is easier to build than a GUI for it.

References