Shell Note 1

Source: Internet
Author: User

  1. The shell is the shell of the operating system, a command interface for users to use the operating system, and a bridge between the user and the operating system kernel.

  2. Shell is commonly known as shell. Refers to the software that provides the user interface (command parser).

  3. As a command language, it interactively interprets and executes commands entered by the user, or automatically interprets and executes a predetermined sequence of commands.

    As a programming language, it defines variables and parameters, and provides many control structures in higher-order languages, including loops and branches.

  4. Shell's main functions:

    (1) Accept commands from the keyboard

    (2) Check the correctness of the command

    (3) An error message is given when the command is incorrect

    (4) The command is correct to use the appropriate system invoke command (generating process)

    (5) command execution complete, give the result of command execution

  5. Linux makes a file of this programming language known as shell script or shell scripts

  6. The shell script is interpreted as execution, not compiled.

  7. The script consists of ASCII text that is read and executed by the shell command interpreter.

  8. When executing a shell script, the command interpreter reads all ASCII text sequentially, one at a time, and executes each statement from beginning to end.

  9. The essence of shell programming is the sequential automatic execution of a series of commands.


  10. Command Description Command Description Command Description Command Description Command Description
    Pwd Show current directory







    passwd
    To modify a user's password








    Ls List content in a directory








    Cd Change the current working directory







    * Match any character of any length







    Match any one character







    [] Any character that belongs to a character group







    Cat Display the entire contents of the output file at once







    File Display the type of file







    More Split-screen display of the contents of a file







    Clear Clear screen, prompt back to top left of screen







  11. Advantages of Shell scripting:

    (1) Complete the goal at once

    (2) Do not type a series of commands repeatedly

    (3) Simplify the operation of the user

  12. After the user has successfully logged into the system, the system generates a specific shell (which is the user's first process) responsible for interpreting the execution User's command or shell script.

  13. At the system prompt, the user types a command or shell script name to execute the specified command or shell script. If the user wishes to terminate the execution of a command or script, it can be done directly by CTRL + C.

  14. If the user finishes the job and wants to eject the system, you can press Ctrl+d or use the command logout or exit.

Shell Note 1

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.