Linux shell and Control lift command detailed

Source: Internet
Author: User

Shell Introduction
The shell is the interface between the user and the Linux operating system. There are multiple shells in Linux, where bash is used by default.

The shell of the Linux system, as the shell of the operating system, provides the user with an interface to use the operating system, which is a command language interpreter with its own built-in shell command set. The shell can also be invoked by other applications in the system, and commands entered by the user at the prompt are interpreted by the shell before being passed to the Linux core.

There are several types of shell in Linux one of the most commonly used are the Bourne shell (SH), the C shell (CSH and Korn shell Ksh), each of the three shells has its own advantages.

The Bourne shell is the first shell used by UNIX and can be used on every UNIX. The Bourne shell is fairly good at shell programming, but not as much as other kinds of shells in dealing with user interactions. The default shell of the Linux operating system is the Bourne Again Shell. It's an extension of the Bourne shell, Short bash. Fully backward compatible with the Bourne shell and added to the Bourne shell, it also includes many of the advantages of the C shell and KornShell, with a flexible and powerful programming interface and a user-friendly user interface.

The C shell is a shell that is more programmable than the Bourne shell, and its syntax is similar to the C language. Linux provides tcsh for people who prefer to use the C shell. TCSH is an extended version of the C shell. TCSH includes command line editing programmable word completion, spelling correction history command substitution, job control, and syntax similar to C language. Not only is it compatible with the bash shell, but it also provides more prompt parameters than Bashshell.

The Korn shell features the advantages of the C shell and Bourne Shell and provides pdksh (Ksh extension) to the Bourne Shell's fully compliant Linux system, which supports task control and can suspend, background execute, Wake, or Terminate programs on the command line.

The default shell of the Redhat Linux system is bash, with $ as a prompt for ordinary users, and a # for Superuser root as a prompt, and you can type the command name and the parameters required for the command once a shell prompt appears.

Let's do an internship. How the shell works, enter the following command at the shell prompt:

$ ls–al
This command lists all the files and subdirectories that are in the current directory.

When a user logs on to Linux, the/etc/passwd file determines which shell to use. For example

The file contains a line similar to the following:

Myself:x:500:500:linux User:/home/myself:/bin/bash

The shell used by the user is listed at the end of each line (/bin/bash).

Since bash is the default shell on Redhat Linux, this article will focus on bash and its related knowledge.

How to use the Shell console
First, we introduce a noun "console", which is the human interface that we usually see using the character manipulation interface, such as DOS. We say console commands are commands that can be operating system input through the character interface. For example, a DOS command is a console command. What we need to know now
is a basic console command based on the Linux operating system.

Linux is a real multi-user operating system, which means it can accept multiple user logins at the same time. Linux also allows a user to log on multiple times, because Linux, like many versions of UNIX, provides access to the Virtual console, allowing users to log on multiple times from the console (the system's console is the monitor and keyboard directly connected to the system) at the same time.

The selection of the Virtual Console can be achieved by pressing the ALT key and a function key, usually using F1-F6. For example, the user clicks the ALT-F2 key after logging in, the user can see "login:" prompt, the user sees the second Virtual Console, and then just press the ALT-F1 key to return to the first Virtual Console. A newly installed Linux system allows users to access the top six virtual consoles using the ALT-F1 to Alt-f6 key.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.