Shell (en)

Aus Gemini-Wiki
Wechseln zu: Navigation, Suche
Deutsch.png - in Deutsch English.png - in English

Shell is the term for a computer user interface based on pure text input and text output. In opposition to graphical user interfaces like Gnome or KDE or the Windows GUI, the shell does not use a mouse or a touchpad or any other input device beside the keyboard.
There is also a shell in Windows which is rarely used, which is called "Console" and is started through "cmd.exe". In most cases, the shell contains some internal commands and several external commands (typically each external command is a single executable which reads text from its input channel and puts text to its output channel). New external commands can be easily added by placing the executables for the new commands into the search path for executables (a list of directories configured somewhere in the settings of the shell, where the shell expects to find executables).
The shell usually provides possibilities to manipulate files, data and shell variables and also a set of commands to control the flow of command dispatching. One can look at this as if it would be a kind of procedural programming language.
So the shell works as some sort of "window" to observe and control the computer, which is running Linux or Unix as operating system (on Windows or OS X, shells are rarely used).
The shell should be seen as a kind of "layer" around the operating system, which enables the user to interact with the computer.

Inhaltsverzeichnis

Everything is text

The shell

The user gets in touch with the computer via the shell. Via shell, he starts applications, changes files or maybe creates a screenshot on a Dreambox 8000. For a lot of common tasks there are ready to use applications, which can be called by their file names and some parameters following. This means, that one has to enter by hand, character by character, the name of the command as well as all the (possible) parameters. The shell is also used by the computer to get in touch with its user by displaying data or messages.

The big advantage of text based user interfaces is the low impact on the computing power for user interactions. E.g. if one wants to display a listing of all files of the current directory, a simple ls -al will do this. A graphical user interface, in opposition to that, would load some kind of window structure, read a lot more data from harddisk, generate a menu hierarchy and maybe even generates some kind of graphical effects to display the information nicely and colored on the screen.

The text based shell makes automation of tasks much easier, because one can use all the commands as part of ones own application (in shell terms, a application can also be a script, which is a pure text file which is interpreted at runtime by the shell).

Even the graphical user interfaces (e.g. "X") with all their colored, bouncing windows, the funny buttons and cumbersome mouse movements, use a shell underneath. Deep inside they use the same commands, but enrich them by several graphical "enhancements".

If the computer to control is not physically available but has a network connection, one can use Telnet or SSH to remotely control it.

Different types

There are different types of shells on different systems (usually more than just one or two). On Linux, the Bash (Bourne Again Shell) is widely used. On Ubuntu, another one called Dash (Debian Almquist Shell) was used as default for a long time. On Dreamboxes, BusyBox is used.

Why not use graphical user interfaces on powerful computers?

We do not want a graphical user interface for our Dreamboxes to control internal stuff, because we don't want to waste precious resources for this. The complete computing power should be used for the core tasks of a Dreambox. To provide TV broadcasts, manage several parallel HD recordings or parallel streaming are more important for the casual user than some bouncing graphical windows for seldom used features.

Reference