Breaking News

The Command Line Interface (CLI)

0 0

In most modern desktop operating systems there are two ways to get things done. The way that the average user is used to doing things is via the graphical user interface (GUI for short). In the GUI things are done by pointing and clicking with the mouse. Options are presented in windows and are typically arranged in a manner that is easy to understand. The command line interface (CLI for short) is just what the name implies… a command line interface. Commands are typed in manually and there is no pretty windows. Many times the GUI is sufficient to get things done but, occasionally you will need to jump into CLI mode. The same can be said whether you are using Linux or Windows. Windows’ CLI interface is called MS-DOS. In Linux the CLI is referred to as the shell. The CLI for both operating systems look very similar and a user could easily confuse the Linux shell with MS-DOS. The difference between the two is a huge one. MS-DOS has become a tiny subset of what it once was with a limited set of commands and capabilities. The Linux shell has only grown in its ability. In Linux you can do EVERYTHING in the CLI and sometimes it is easier to do it that way. Sometimes it is just necessary.

The Shell
When you are using the CLI in Linux you are running the shell. The shell is a program that acts as an iterpreter between you and the operating system. When you type a command into the shell it takes it and sends it to the operating system. The operating system then executes that command and sends the output back to the shell where it is displayed for you to see the results. In Mepis (as in most modern Linux distributions) the default shell is called bash (bash stands for Bourne Again SHell).

The Terminal
There are two ways of getting to the shell in Linux: 1. The terminal emulator. 2. The virtual terminal.
If you are in the GUI there is absolutely no reason why you cannot use the shell at the same time. This is done via the terminal emulator. A terminal emulator is a program that opens a window and then runs the shell in that window. This makes it easy to use the shell while you are in GUI mode.
The other way is without the GUI at all. By default Linux usually has six virtual terminals running. These can be accessed by pressing Ctrl+Alt+F1 (F2 for the second, F3 for the third and so on). The GUI is usually running on the seventh terminal. If you get to a virtual terminal simply press Ctrl+Alt+F7 to get back to the GUI.

In the Shell
If you are using Mepis then chances are that you are in KDE (the K Desktop Environment) which is the default GUI. You can change this at a later date once you are more comfortable with Linux. For now lets open up a well known terminal emulator called Konsole.
1. Click on the “K” button in the lower left hand corner of your screen. This will bring up the K Menu. The K Menu is similar to the Windows Start menu.
2. Find and click on System.
3. Find and click on Konsole (Terminal Program).
A new window will open up. This is a terminal emulator and running in it is the bash shell. In this window you will see this:
[email protected][~]$
This shows your username the @ symbol and your computername. The [~] means you are in your home directory and the $ indicates that you are a normal user. This is the command prompt and is where commands will be entered.

Conclusion
Now that you know how to get to the shell you can move on to the Commands tutorials. As stated, most things can be accomplished in the GUI but we hope that you will expand you knowledge of your operating system and learn to use the CLI.

Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %

Average Rating

5 Star
0%
4 Star
0%
3 Star
0%
2 Star
0%
1 Star
0%

Leave a Reply

Your email address will not be published. Required fields are marked *