17 Shell Basics
When working with Linux these days, you can communicate with the system almost
without ever requiring a command line interpreter (the shell). After booting your
Linux system, you are usually directed to a graphical user interface that guides you
through the login process and the following interactions with the operating system.
The graphical user interface in Linux (the X Window System or X11) is initially cong-
ured during installation. Both KDE and GNOME desktop (and other window managers
you can install) use it for interaction with the user.
Nevertheless, it is useful to have some basic knowledge of working with a shell be-
cause you might encounter situations where the graphical user interface is not
available. For example, if some problem with the X Window System occurs. If you
are not familiar with a shell, you might feel a bit uncomfortable at rst when entering
commands, but the more you get used to it, the more you will realize that the com-
mand line is often the quickest and easiest way to perform some daily tasks.
For UNIX or Linux several shells are available which dier slightly in behavior and in
the commands they accept. The default shell in openSUSE® is Bash (GNU Bourne-
Again Shell).
The following sections will guide you through your rst steps with the Bash shell and
will show you how to complete some basic tasks via the command line. If you are
interested in learning more or rather feel like a shell “power user” already, refer to
Chapter 18, Bash and Bash Scripts (page 225).
17.1 Starting a Shell
Basically, there are two dierent ways to start a shell from the graphical user interface
which usually shows after you have booted your computer:
• you can leave the graphical user interface or
• you can start a terminal window within the graphical user interface.
While the rst option is always available, you can only make use of the second option
when you are already logged in to a desktop such as KDE or GNOME. Whichever way
you choose, there is always a way back and you can switch back and forth between
the shell and the graphical user interface.
If you want to give it a try, press [Ctrl] + [Alt] + [F2] to leave the graphical user inter-
face. The graphical user interface disappears and you are taken to a shell which
prompts you to log in. Type your username and press [Enter]. Then type your pass-
Shell Basics 191