B
efore icons and windows took over computer screens, you typed
commands to interact with most computers. On UNIX systems, from
which Linux was derived, the program used to interpret and manage
commands was referred to as the shell.
No matter which Linux distribution you are using, you can always count on
one thing being available to you: the shell. It provides a way to create exe-
cutable script files, run programs, work with file systems, compile computer
code, operate a system, and manage the computer. Although the shell is less
intuitive than common graphic user interfaces (GUIs), most Linux experts
consider the shell to be much more powerful than GUIs. Shells have been
around a long time, and many advanced features have been built into them.
The Linux shell illustrated in this chapter is called the bash shell, which stands
for Bourne Again Shell. The name is derived from the fact that bash is com-
patible with the first UNIX shell: the Bourne shell (named after its creator,
and represented by the
sh
command). While bash is included with most
distributions, and considered a standard, other shells are available. Other
popular shells include the C shell (csh), which is popular among BSD UNIX
users, and the Korn shell (ksh), which is popular among UNIX System V
users. Linux also has a tcsh shell (a C shell look-alike) and an ash shell
(another Bourne shell look-alike). Several different shells are introduced in
this chapter.
The odds are strong that the Linux distribution you are using has
more than one shell installed by default and available for your use.
Several major reasons for learning how to use the shell are:
You will know how to get around any Linux or other UNIX-like
system. For example, I can log in to my Red Hat Enterprise Linux
TIP
TIP
35
IN THIS CHAPTER
Understanding the Linux shell
Using the Linux shell
Working with the Linux file
system
Using the vi text editor in Linux
Running Commands
from the Shell