Shell Introduction: What are the two ways to execute a shell,shell command

Source: Internet
Author: User

The shell itself is a program written in C, which is a bridge for users to use Unix/linux, and most of their work is done through the shell. The shell is both a command language and a programming language. As a command language, it interprets and executes user-entered commands interactively, and as a programming language, it defines variables and parameters and provides many control structures in high-level languages, including loops and branches.

Although it is not part of the Unix/linux system kernel, it invokes most of the functionality of the system core to execute programs, create files, and coordinate the operation of individual programs in a parallel way. Therefore, for the user, the shell is the most important utility program, in-depth understanding and proficiency in the shell features and how to use it is the key to good unix/linux system.

It can be said that the proficiency of the shell is a reflection of the user's proficiency in the use of unix/linux.

Note: There is no point in learning the Shell alone, please refer to the Unix/linux Getting Started tutorial to learn Unix/linux basics.

The shell has two ways of executing commands:

    • Interactive (Interactive): Explains the execution of a user's command, the user enters a command, and the shell interprets the execution of a single rule.
    • Batch: The user writes a shell script in advance, with a number of commands that allow the shell to execute the commands at once without having to hit the command one at a time.


Shell scripts are similar to programming languages, and there are variables and process control statements, but shell scripts are interpreted and do not need to be compiled, and the shell program reads and executes the commands from a single line of script, which is equivalent to a user knocking a line of commands from the script to the shell prompt for execution.

For Shell Beginners Please note that in a normal application, it is not recommended to run the shell with the root account. As a normal user, no matter whether you intentionally or unintentionally, can not destroy the system, but if it is root, it is different, as long as a few letters, can lead to disastrous consequences.

Shell Introduction: What are the two ways to execute a shell,shell command

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.