The command line

botond published 2018/04/14, Sat - 01:37 time

Most of the tutorials on this page are from the command line only (CLI), that is, the terminal typed. Therefore, it is worth mentioning a few words about terminals. In this article, I will not go into the technical details, I will only describe a brief, comprehensive background on the subject. More detailed information can be found in the encyclopedia.

 

What is a terminal?

Anyone who has used MS-DOS before may be familiar with command.com, the DOS shell. This program displays the C: \> prompt. In Windows, you can see this prompt by opening a command prompt window (Start menu -> Run -> "cmd" command).

The Linux shell is a bit like a DOS or Windows shell, but it knows a lot more. The Linux shell is called shell.

In many Linux distributions, bash the default shell. When you open a terminal window or log in to the text console, the bash shell is what awaits the commands. Then when you type a command, the shell executes it.

Just as there are several GUIs (like GNOME or KDE), you can choose a shell other than bash. THE chsh command to easily change the default shell.

In addition to standard Linux commands, bash can run any Linux program. Thus, at the shell prompt, you can also type in the name of an application (the name is usually much more mysterious than you might find in the menus of the graphical interface) and the shell will launch it.

 

Work in the terminal

With the help of the command line interface, we can perform our system administration activities very efficiently. In most cases, we can’t sit in front of the machine we’re working on, but connect remotely to the server and just do our job. In this case, the low bandwidth used by the command line connection and thus the fast response time of the server is a major determining factor.

Today, of course, modern broadband internet connections make it possible to set up remote desktop connections (RDP), so even the entire desktop environment can be remotely controlled. However, in many cases, tasks cannot be solved in the graphical interface alone because there is no built-in menu or panel for every problem. In such situations, it is necessary to use the command line or command line scripts to troubleshoot the problems or prevent a possible attack. Furthermore, it should not be forgotten that graphical interfaces are not normally installed on a live server machine, minimizing unnecessary use of resources.

In summary, if you only use Linux as a non-home multimedia or office desktop / laptop, you can't avoid using a terminal and command line. So if you choose Linux as your operating system, it's a good idea to make friends with it as soon as possible.