Quick Start Guide
18 Bash and Bash Scripts
These days many people use computers with a graphical user interface (GUI) like
KDE or GNOME. Although they oer lots of features, their use is limited when it comes
to the execution of automated tasks. Shells are a good addition to GUIs and this
chapter gives you an overview of some aspects of shells, in this case Bash.
18.1 What is “The Shell”?
Traditionally, the shell is Bash (Bourne again Shell). When this chapter speaks about
“the shell” it means Bash. There are actually more available shells than Bash (ash,
csh, ksh, zsh, …), each employing dierent features and characteristics. If you need
further information about other shells, search for shell in YaST.
18.1.1 Knowing The Bash Conguration Files
A shell can be invoked as an:
1. interactive login shell. This is used when logging in to a machine, invoking Bash
with the --login option or when logging in to a remote machine with SSH.
2. “ordinary” interactive shell. This is normally the case when starting xterm, kon-
sole, gnome-terminal or similar tools.
3. non-interactive shell. This is used when invoking a shell script at the commandline.
Depending on which type of shell you use, dierent conguration les are being
read. The following tables show the login and non-login shell conguration les.
Table 18.1: Bash Conguration Files for Login Shells
DescriptionFile
Do not modify this le, otherwise your
modications can be destroyed during
your next update!
/etc/profile
Use this le if you extend /etc/profile/etc/profile.local
Contains system-wide conguration les
for specic programs
/etc/profile.d/
Bash and Bash Scripts 225










