The shell is a program that acts as a buffer between you and the operating system. In its role as a command interpreter, it should (for the most part) act invisibly. It can also be used for simple programming.
There are three main uses for the shell: interactive use, customizing your Linux session, and programming.
When the shell is used interactively, it waits for you to issue commands, processes them (to interpret special characters such as wildcards), and executes them. Shells also provide a set of commands, known as built-ins , to supplement Linux commands.
A Linux shell defines variables, such as the locations of your home directory and mail spool, to control the behavior of your session. Some variables are preset by the system; you can define others in startup files that your shell reads when you log in, or interactively for a single session. Startup files can also contain Linux or shell commands, for execution immediately after login.
A series of individual commands (be they shell commands or other Linux commands available on the system) combined into one executable file is called a shell script . Batch files in MS-DOS are a similar concept. bash is considered a powerful programming shell, while scripting in tcsh is rumored to be hazardous to your health.