Linux in a NutshellLinux in a NutshellSearch this book

Chapter 6. The Linux Shells: An Overview

Contents:

Purpose of the Shell
Shell Flavors
Common Features
Differing Features

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.

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.



Library Navigation Links

Copyright © 2003 O'Reilly & Associates. All rights reserved.