Novell SuSE Linux Professional 9.2 Upgrade [Strong Encryption 128 Bit] 00662644457260 ユーザーズマニュアル

製品コード
00662644457260
ページ / 324
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.
21.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. It is, by far, the most widely used derivative of the Bourne
shell (sh). Once you have opened the shell, see the prompt on the first line. The
prompt usually consists of the user name, host name, and current path, but it can
be customized. When the cursor is behind this prompt, you can send commands
directly to your computer system.
21.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 file name, 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
the
--help
option. 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
.
21.1.2
Files and Directories
To use the shell efficiently, it is really useful to have some knowledge about the
file and directory structures of a Linux system. You can think of directories as
256
21.1. Introduction to Bash