Shell and Command Basics

Source: Internet
Author: User

What is a shell?

The shell is the user interface of the system, which provides an interface (command parser) that the user interacts with the kernel, and the shell receives the user's input command and sends it to the kernel for execution, such as

Shell's function

The most important function of the shell is command interpretation, and all executables in the Linux system can be executed as shell commands. To classify an executable file as a

    • Linux commands: Commands stored in the/bin,/sbin directories
    • Built-in commands: For efficiency reasons, some common commands are constructed inside the shell
    • Utility: Utilities or tools stored in directories such as/usr/bin,/usr/sbin,/usr/share,/usr/local/bin, etc.
    • User program: After compiling the executable file, the user program can also be run as a shell command
    • Shell script: A batch file written by the shell language

Parsing process

Rhel/centos The default shell is bash, and there are other shells, such as bsh,ksh,csh

Shell Meta-characters

The wildcard character of a shell

Escape character of the shell

Command format for Shell

1 # cmd [-options] [arguments]

Where CMD is the command; options is an option; arguments is a parameter, that is, the action object

PS: Single character parameter use-, Word parameter use--

Hint: "*" can match "." In the file or directory name, but cannot match the first character is "." The file or directory name. The ". *" should be used to match the implied file.

Shell and Command Basics

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.