Читать книгу Linux Command Line and Shell Scripting Bible - Christine Bresnahan - Страница 15

Part I
The Linux Command Line
Chapter 3
Basic bash Shell Commands
Starting the Shell

Оглавление

The GNU bash shell is a program that provides interactive access to the Linux system. It runs as a regular program and is normally started whenever a user logs in to a terminal. The shell that the system starts depends on your user ID configuration.

The /etc/passwd file contains a list of all the system user accounts, along with some basic configuration information about each user. Here's a sample entry from a /etc/passwd file:


Each entry has seven data fields, with fields separated by colons. The system uses the data in these fields to assign specific features for the user. Most of these entries are discussed in more detail in Chapter 7. For now, just pay attention to the last field, which specifies the user's shell program.

Note

Though the focus is on the GNU bash shell, additional shells are reviewed in this book. Chapter 23 covers working with alternative shells, such as dash and tcsh.

In the earlier /etc/passwd sample entry, the user christine has /bin/bash set as her default shell program. This means when christine logs into the Linux system, the bash shell program is automatically started.

Although the bash shell program is automatically started at login, whether a shell command line interface (CLI) is presented depends on which login method is used. If a virtual console terminal is used to log in, the CLI prompt is automatically presented, and you can begin to type shell commands. However, if you log into the Linux system via a graphical desktop environment, you need to start a graphical terminal emulator to access the shell CLI prompt.

Linux Command Line and Shell Scripting Bible

Подняться наверх