Suse LINUX Professional 9.3 Update 00662644461625 User Manual

Product codes
00662644461625
Page of 304
Text-based applications are especially important for controlling older Linux com-
puters that do not have the resources for demanding display systems. Virtual
consoles are used in this case. Six of them are available in text mode. Press




Alt
-




F1
through




Alt
-




F6
. The seventh console is reserved for X.
19.1
Introduction to Bash
In the KDE taskbar, there is an icon depicting a monitor with a seashell. When
you click this icon, a console window opens in which to enter commands. The
console normally runs Bash (Bourne again shell), a program developed as part
of the GNU project. Once you have opened the shell, see the prompt on the first
line. The prompt usually consists of the username, hostname, and current path,
but it can be customized. When the cursor is after this prompt, you can send com-
mands directly to your computer system.
19.1.1
Commands
A command consists of several elements. The first element is always the actual
command, followed by parameters or options. Commands are executed when
you press




Enter
. Before doing so, easily edit the command line, add options, or
correct typing errors. One of the most frequently used commands is
ls
, which
can be used with or without arguments. Entering the plain
ls
command in the
console shows the contents of the current directory.
Options are prefixed with a hyphen. The command
ls -l
, for instance, shows
the contents of the same directory in full detail. Next to each filename, see the
date when the file was created, the file size in bytes, and further details, which
are covered later. One very important option that exists for many commands is
--help
. By entering
ls --help
, display all the options for the
ls
command.
Also use the
ls
command to view the contents of other directories. To do so, the
directory must be specified as a parameter. For example, to see the contents of
Desktop
, enter
ls -l Desktop
.
19.1.2
Files and Directories
To use the shell efficiently, it is really useful to have some knowledge of the file
and directory structures of a Linux system. You can think of directories as elec-
tronic folders in which files, programs, and subdirectories are stored. The top
246
19.1. Introduction to Bash