Team LiB   Previous Section   Next Section

6.1 Purpose of the Shell

There are three main uses for the shell: interactive use, customizing your Linux session, and programming.

6.1.1 Interactive Use

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.

6.1.2 Customizing Your Linux Session

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.

6.1.3 Programming

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.

    Team LiB   Previous Section   Next Section