Linux

Only available on StudyMode
  • Topic: C shell, Unix, Standard streams
  • Pages : 4 (904 words )
  • Download(s) : 94
  • Published : January 26, 2013
Open Document
Text Preview
Linux - The shell
-------------------------------------------------
Introduction to the shell
The command interpreter is the interface between the user and the operating system, hence the name "shell".

The shell therefore acts as an intermediary between the operating system and the user thanks to command lines that are entered by the latter. Its role consists in reading the command line, interpreting its meaning, carry out the command, and then return the result via the outputs. The shell is an executable file responsible for interpreting the commands, transmitting them to the system, and returning the result. Ther are several shells, the most common being sh (called "Bourne shell"), bash ("Bourne again shell"), csh ("C Shell"), Tcsh ("Tenex C shell"), ksh ("Korn shell"),and zsh("Zero shell"). Their name generally matches the name of the executable. Each user has a default shell, which will be launched upon opening of a command prompt. The default shell is specified in the dans configuration file /etc/passwd in the last field of the line corresponding to the user. It is possible to change the shell during a session by simply executing the corresponding executable file, for example:

/bin/bash
-------------------------------------------------
Prompt
The shell is initialized by reading its overall configuration (in a file of the directory /etc/), followed by reading the user's own configuration (in a hidden file whose name starts with a dot, located in the basic user directory, i.e. /home/user_name/.configuration_file). Then, a prompt is displayed as follows:

machine:/directory/current$
By default, for most shells, the prompt consists of the name of the machine, followed by two points (:), the current directory, then a character indicating the type of user connected: * "$" speciies a normal user

* "#" specifies the administrator, called "root"
-------------------------------------------------
The command line...
tracking img