Bài 3: Objectives

In this lesson, you will learn to: • Define the role and features of the Linux shell • Use the shell as a command interpreter • Create userdefined variables • Use shell environment variables • Create shell scripts in Linux Define the role and features of the Linux shell Use the shell as a command interpreter Create user­defined variables Use shell environment variables | Objectives In this lesson, you will learn to: Define the role and features of the Linux shell Use the shell as a command interpreter Create user-defined variables Use shell environment variables Create shell scripts in Linux Introduction to the Shell A shell: Is a utility program with the Linux system that serves as an interface between the user and the kernel Plays an important role of command interpretation for the kernel The adjacent figure shows the architecture of the Linux operating system. Features of a Shell The shell has the following features: Interactive processing Background processing Input/output redirection Pipes Shell scripts Shell variables Programming language constructs Command history Job control File name completion Command completion Shell as a Command Interpreter The shell: Reads the command Locates the file in the directories containing utilities Loads the utility into memory Executes the utility Shell as a Command Interpreter (Contd.) The shell | Objectives In this lesson, you will learn to: Define the role and features of the Linux shell Use the shell as a command interpreter Create user-defined variables Use shell environment variables Create shell scripts in Linux Introduction to the Shell A shell: Is a utility program with the Linux system that serves as an interface between the user and the kernel Plays an important role of command interpretation for the kernel The adjacent figure shows the architecture of the Linux operating system. Features of a Shell The shell has the following features: Interactive processing Background processing Input/output redirection Pipes Shell scripts Shell variables Programming language constructs Command history Job control File name completion Command completion Shell as a Command Interpreter The shell: Reads the command Locates the file in the directories containing utilities Loads the utility into memory Executes the utility Shell as a Command Interpreter (Contd.) The shell creates a child shell for the execution of a utility The shell requests the kernel for any hardware interaction Unix Shells Some of the popular Unix Shells are: Bourne Shell: sh is the executable filename for this shell C Shell: csh is the executable filename for this shell Korn Shell: The executable filename is ksh Restricted Shell: Is typically used for guest logins Linux Shells Some of the popular shells available in Linux are: Bash: Is an acronym for ‘Bourne Again Shell’ and is the default shell for most Linux systems Uses the symbolic link sh Tcsh: Is an acronym for ‘Tom’s C shell’ also known as the TC shell It is an enhancement of the C shell Uses the symbolic link csh Can be executed by using either csh or tcsh at the shell prompt ASH: Is usually suitable on machines that have very limited memory Uses the symbolic link, bsh in Fedora Core 2 Changing the Default Shell The default shell of the user is specified in the /etc/passwd file. The chsh command can be used for

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.