If you are a programmer, why should you know how to use the Console?

Jose Gratereaux
5 min readOct 3, 2021
Photo by Gabriel Heinzer on Unsplash

Also known as command line interface, command console user interface, or console user interface. It is a component that allows interaction with the user where he must enter commands to a program in the form of text (command lines)

These types of interfaces were used by default in systems from the 60s to the 80s and 90s. Currently it is rarely used by casual users who prefer graphical user interfaces (GUI).

Curiously, it is a preferred medium for more advanced users since it allows precise and powerful control over a program or operating system.

Like everything in life, it has advantages and disadvantages, and this is no exception. But first of all it should be emphasized that there will be a certain emphasis on this type of interface since, despite not being popular, in the world of programming they are extremely useful. Now if we continue.

Photo by Sai Kiran Anagani on Unsplash

- Pros:

Requires few resources

When dealing with only text it does not require much processing which gives you the ability to use the time not wasted in completing the required task and not in processing the display of an image.

Concise and powerful

Under this paradigm a program has many options that are usually hidden but can be accessed through the correct command giving power to the tool. This is because the focus is on functionality and not necessarily simplicity.

Preferred by experts

It is usually a trend. Which is not to say that experts always use it or that one is an expert for the simple fact of using them. Thanks to the power of this paradigm and the low consumption of resources, demanding users often use them.

This occurs for example in the field of engineering and computer science.

Easy to automate

Thanks to the fact that the interaction is based on text, it is possible to join several commands into one, forming procedures or scripts, that is, small pieces of code with a specific function such as organizing files, applying quick editing to a document, among others.

- Cons

Not very intuitive

The main reason why they are rarely used is because of the complexity of use. Normally a user does not know what to do when he comes across these types of interfaces. The learning curve is long and often tedious when compared to graphical user interfaces.

Unobvious commands

This goes hand in hand, apparently in the previous section. The name of a command may not exactly match its function.

A classic example is the CHKDSK program on Windows systems. This is in charge of analyzing the disk in search of errors where the meaning would be “CHecK DiSK”.

Not visually rich

Another weakness is that it only allows you to express things through plain text. Which leads us to not being able to view images, videos, work in multimedia editing, etc.

Not rookie friendly

Combining these three disadvantages we form a larger one. First-time users do not know how to work unless they have had prior instruction or have read the respective reference manual.

It should be emphasized the importance of resorting to documentation and in fact in programming the affinity to reading this type of material is essential.

Photo by Pankaj Patel on Unsplash

For example, if you have a remote server and you want to access it remotely, although there are programs to access it visually, let’s imagine that we have to analyze 1Gb logs. For this we would have to download them on our machine. However, if we do it via SSH via Shell and use a program like Tails or Less to view those files, it will be much better than if we configure a text editing program on our computer with a graphical interface, which connects via SSH to the server and download that gig of data and visualize it.

In addition, assembling all this requires time and using the Shell takes less time and will be used for more things.

Another example is Git, we can quickly remotely clone a repository, update it or make any modification via command line, while any GUI takes us longer to perform this operation.

Not to mention copying, moving or deleting files via FTP, it takes much longer than doing it via console.

Console, terminal and shell today

Teminal

A terminal refers to a container program that runs a shell. Decades ago, this was a physical device that consisted of little more than a monitor and keyboard. As Unix and Unix-like systems such as GNU / Linux added better multiprocessing systems and windows, this terminal concept was summed up in software. They are now known as terminal emulators that launch a window in an environment where a shell will run where you can enter commands.

Console

The console is a special type of terminal. Historically, the console was a single keyboard and monitor connected to a dedicated serial console port on a computer used for direct low-level communication with the operating system. Modern GNU / Linux systems offer virtual consoles. They are accessed through key combinations (for example, Ctrl + Alt + Fx; the function key numbers different consoles) that are handled at low levels of the operating system; this means that there is no special service that must be installed and configured to run. Interaction with the console is also done through a shell program.

A curious fact is that TTYx is used to list the consoles (for example: TTY1, TTY2, etc), these being the abbreviation of the teletype terminals.

Photo by Alex Chumak on Unsplash

Shell

The shell is the program that actually processes commands and returns results. Most shells also handle foreground and background processes, command history, and command line editing. These features (and many more) are standard in bash, the most common shell on modern GNU / Linux systems.

Some of the best today:

  • Git Bash
  • Power Shell
  • CSH
  • ZSH

Jose @ jslatino.com

--

--

Jose Gratereaux

Spanish and English content for Agnostic things about Technology. Im writer of HumanTech.do Blog and love to share experiences that i learned on my carrer.