Linux Interfaces

Linux Interface

There are a number of ways of interacting with a computer including the particularly popular graphical user interface or GUI. It is what most computer users are familiar with and also happens to be how you’re currently reading this article. In order to study the operating system interface, we’ll need to understand the other way to interact with a computer - the terminal.

The terminal

You may be familiar with the terminal, however, you may also have the wrong impression of the terminal as being highly complex and used only by hackers.

The terminal is generally known to be a black screen with a little cursor that allows users to type in their commands via a keyboard. The terminal itself is a program, loaded by the operating system after it has completed its initialisation sequence. The terminal program allows users to interact with other programs available in the storage unit either by typing in the name of the program itself or supplied with other data known as parameters.

While the concept of the terminal is an old input method that is seemingly complex, the developer community continues to enhance it and extend its capabilities. More importantly, it is used by a growing fan base. The terminal may be primitive in nature but it continues to be an effective, direct and swift way of getting certain things done.

There are many systems, programmes and tools available only in text-based format, and the Linux operating system would generally be shipped with a set of standard text-based tools - a topic worth discussing separately. Such tools are known to be headless tools, alluding to the lack of GUI.

‘Headless’ refers to the lack of Graphical User Interface (GUI), which also means it is a more primitive text-based input/output method that is used to interact with a headless system such as the terminal.

The terminal itself is a programme, a piece of code with many versions of it. Shell, or BASH to be more precise, is the most common version of a terminal used on Linux systems. BASH which stands for Bourne Again Shell is an enhanced version of Shell that is shipped with almost every distribution of Linux, and is generally a good starting point. Windows on the other hand is shipped with Microsoft’s equivalent of BASH known as the Command Line which was later enhanced and rebranded to PowerShell. Regardless of their names, all terminals share a common behaviour and usage style.

Zsh is a newer version of the Terminal that is quickly gaining popularity and is worth checking out.

How does the terminal work?

There are two distinct things you’d do on a terminal. The first is navigation and the second is running programmes. In fact, navigation relies on a programme which means there’s really only one thing you can do on a terminal that is to run programmes, or invoking programmes which is the more ‘scientific’ name for this operation.

The terminal is a text-based interface, meaning the presence of a mouse is not required when interacting with it. It generally prompts the user with a symbol such as “$” followed by a blinking cursor that indicates it is now idle and ready to receive commands via the keyboard.

Typing any random word such as “dexter” into the terminal would result in a “command not found” error. In order to do something useful, you require knowledge on available programmes installed on this computer such as “cd”, “touch” and “vim”. Every Linux distribution has a standard set of commands/programs pre-installed within it which we’ll discuss in another topic.

$ dexter
OUTPUT
	bash: dexter: command not found

Typing the name of a programme would generally result in the programme displaying a quick user manual explaining how to use the programme, such as in the following example:

$ touch
OUTPUT

usage: touch [-A [-][[hh]mm]SS] [-achm] [-r file] [-t [[CC]YY]MMDDhhmm[.SS]]
				[-d YYYY-MM-DDThh:mm:SS[.frac][tz]] file ...

All terminal programmes behave in a similar manner where you’re required to type the name of the programme first, followed by a list of arguments and flags. It’s also worth mentioning that the terminal is only capable of performing a single operation at a time like the following:

$ ls -alt /home/dexter/
OUTPUT

total 64
drwx------+ 54 dexter  1651299590   1728 Apr 24 15:58 Downloads
-rw-------   1 dexter  1651299590    736 Apr 20 09:14 .bash_history
-rw-------   1 dexter  1651299590   1199 Apr 19 21:44 .bash_profile
drwxr-x---+ 22 dexter  1651299590    704 Apr 19 21:44 .
-rw-------   1 dexter  1651299590   1199 Apr 19 21:44 .viminfo
drwx------@  4 dexter  1651299590    128 Apr 19 14:40 Desktop
drwx------+ 13 dexter  1651299590    416 Apr 11 21:24 .Trash
drwxr-xr-x@  6 dexter  1651299590    192 Apr 11 21:24 Developer
drwx------@ 21 dexter  1651299590    672 Apr 10 11:53 Documents
drwx------+  4 dexter  1651299590    128 Apr  7 13:47 Music
drwx------   4 dexter  1651299590    128 Apr  2 08:06 Movies
drwx------@  4 dexter  1651299590    128 Apr  1 20:04 Pictures
drwxr-xr-x+  4 dexter  1651299590    128 Apr  1 16:02 Public

Arguments represent input to the programme, it’s like telling Microsoft Word to open a specific file. Flags on the other hand can influence the behavior of the programme, an example would be to tell MS Word to start in Edit mode vs Read Only mode.

To interact with the terminal you’re not required to be seated next to the computer, interaction with a Linux system remotely is possible if a programme called “Secure Shell” or sshd is installed. This type of interaction without a desktop environment is referred to as a console, and you can do so using any other computer using any other operating system such as MacOS.

Accessing Linux via sshd

The graphical user interface

Generally, technology tends to emulate real world interactions. For instance, take the desktop on your screen where you can switch between backgrounds and layouts. The desktop is built to emulate your work desk where its surface or environment can be customised to your liking.

The work environment is usually fine-tuned to suit the nature of work. A carpenter’s work environment is generally filled with wood cuttings and carving tools. On the other hand, an electrical engineer would have his environment filled with an entirely different set of tools.

Much like the real world, operating systems are designed with different work environments to suit the type of work it would be used for. The most commonly known environment happens to be the familiar desktop environment you see on your computer screen. MacOS is famous for its user-friendly Finder interface while Windows is known for its Start menu button.

Linux, unlike other operating systems, tend to treat the GUI portion of the system as a standalone application that can be uninstalled and/or swapped with other versions. Popular versions include GNOME and KDE. We won’t dive into the differences between them but just like the carpenter vs electrical engineer scenario, different GUI versions can provide an entirely different environment for users to interact with.

Why is it called an ‘environment'? Well, if you think about it, there can be multiple user accounts on a single desktop machine and each user can have his preference of file and apps arrangement and wallpaper. By logging in and out of user accounts, you can see a clear demonstration of how an entire environment changes to fit individual user preferences.

The most preferred method of interacting with Linux is when a computer is used as a workstation, where the user faces a monitor connected to a Linux system.The desktop environment is best when it comes to multitasking and enabling users to have more than one application running at a time.

Where are computer interfaces headed?

Steve Jobs envisioned a personal computer in everyone’s hands. What was once a distant dream in his early days is now a reality. While our understanding of how a computer should look may be similar, we all use our computers differently for various reasons. Computers are indispensable tools because they allow us to do a variety of tasks at a speed that is otherwise unachievable by humans.

Computers allow general users to browse the web and check their emails, they also allow software engineers to create more instructions or programmes that help us accomplish more complex tasks and calculations thus creating more ways to use them. Computers are also used to simulate the creation of other computers.

One thing is for sure, technology should not get in the way of accomplishing our tasks. What I tend to take from this is that people should not be glued to their chairs behind their screens, but instead still be able to move around freely while commanding their super computers using only voice commands or even better, using conversational languages much like how Iron Man does it. While current technologies may not be capable of achieving the level of sophistication found in Jarvis yet, let us take comfort in the fact that we came a long way since the early days of computing.

Final thoughts

The familiar desktop environment or graphical user interface (GUI), while it resembles how a computer looks like in today’s technology landscape remains inadequate to explain how a computer interface works. Some Linux users spend their entire lives without ever interacting with a Linux desktop environment, relying entirely on the console/terminal instead.

It’s important to note that developers have created a terminal application you can run inside the desktop environment. Using a terminal in this manner, however, is not the same as using a headless environment as you still require the desktop environment to gain access to the Terminal.

What you intend to use your Linux system for can greatly influence the type of interface you should be using or focusing on learning. Since it can be daunting to familiarise yourself with a new environment, it is generally easier to start with the familiar desktop environment which helps to flatten your learning curve and demonstrate results more quickly. Learning to use the terminal is not that difficult, though. Many people especially software developers use both the desktop and console environments interchangeably on daily basis. But if all you need is to browse the web, edit some photos or perhaps create a few spreadsheets, the terminal may not be of much use.

Was this page helpful?

Most Viewed Articles
  • Understanding programming in 15 minutes

    Understand IT in 15 minutes

    For non-programmers, this topic can seem intimidating but it shouldn’t have to. To know why, here is a brief explanation of IT using basic mathematics.

    Read article

  • The Kernel

    The Linux Kernel

    The Kernel is not something that most users would interact with, yet it's the most essential component of a computer. Find out why.

    Read article

  • How computers work

    How computers work

    Computers are not always as we think they are. They come in various shapes and sizes, many of which are monitor- and keyboard-less. So what makes a computer?

    Read article