Shell operations and simple programming (1)

Source: Internet
Author: User

Shell is a command interpreter in Linux and the main environment in Linux. It has many functions, it mainly describes the basic concepts of shell, shell types, special characters in shell, redirection, and shell program. The focus is on shell special characters and shell programming.

What is shell?

When you log on to Linux, you can enter the X Window-based graphic Windows System: KDE. Of course, a lot of work can be done in the graphic environment, but in many cases in the server application environment, you need to remotely connect to the server for management configuration, and use the command line mode for management is more convenient and simple, therefore, learning and using Linux and shell are essential.

If the system is set to not automatically start the graphic interface, after logging on, the user will get a shell prompt waiting for the command to be entered, marking that the command can start to be issued; if the system is set to automatically start the graphics system, you can click Start → thiz menu instant menu → Simplified Chinese terminal (gb2312) to run the terminal simulation program, enter any command and parameters at the end of the command prompt, as shown in 3-1.


Figure 3-1 run the terminal Analogy Program

When a user logs on to or runs a terminal Analogy Program, the user actually enters the shell. So what is shell? To be exact, shell is a command line interpreter. It is used to explain the input commands and pass them to the system according to certain syntaxes. It provides you with an interface system-level program that sends requests to Linux to run the program. You can use shell to start, suspend, stop, or even write some programs.

Shell itself is a program written in C language, which serves as a bridge between users using Linux. Shell is both a command language and a programming language. As a command language, it interactively interprets and executes user-input commands. As a programming language, it defines various variables and parameters, it also provides many control structures that are available only in higher-level languages, including loops and branches. Although it is not part of the Linux kernel, it calls most of the functions of the system kernel to execute programs, create documents, and coordinate the running of various programs in parallel. Therefore, shell is the most important utility for users. It is the key to make good use of the Linux system by thoroughly understanding and mastering the features of shell. It can be said that the proficiency of shell reflects the user's proficiency in Linux.

When you use Linux, you can use commands to complete the required work. A command is a basic unit of dialog between a user and a shell. It is a string consisting of multiple characters and ended with a line break. Shell explains the commands entered by users. Unlike command.com in DOS, command.com has only one command in DOS, while there are several popular shells in Linux, each shell has its own merits. Generally, bash is used as the default shell in Linux.

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.