Shell of Linux Basics (1)

Source: Internet
Author: User

The shell acts as an interface between the user and the kernel in the Linux system, which is used to convert the commands entered by the user into instructions that the kernel can understand, and then to perform the corresponding functions through the kernel operation hardware resources. The shell is divided into two types, the graphical shell and the command-line shell. The graphical shell mainly has kde,gnome and so on, command line Shell has the common sh,zsh,csh,bash,ksh,tcsh and so on.

Here the main features of bash are the most commonly used, and as a user's working environment, Bash has the following characteristics:

1. Command history

You can view the commands that the user has entered through the history command

2. Command completion

Command completion and path completion can be done through the TAB key

3. Pipeline Redirection

Pipeline: The output of the previous command can be used as input to the latter command.

Redirect: Redirects the standard output (usually the screen) of the result of the original command execution to another place (such as a file).

4. Command aliases

For very long commands, you can use alias to set aliases for variables to simplify user command input

such as Alias Ls=ls-lhva

5. Command-line editing

Common shortcut keys for editing commands at the command line help users to edit commands quickly

CTRL + a jumps to the beginning of the command

Ctrl+e jump to the end of the command line

Ctrl+u Delete the cursor to the beginning of the command line

Ctrl+k Delete the cursor to the end of the command line

Ctrl+l: Clear Screen

6. Command line expansion

The {} can be expanded into multiple commands to simplify user input.

For example, Mdir ~/{m,n,/x/z} is equivalent to

mkdir ~/m

mkdir ~/n

mkdir ~/x/z

7. File name Matching

This is accomplished by wildcard characters.

8. Variables

Variable as a named memory space, divided into two categories.

System variables such as path command search paths

User-defined variables

9. Programming

Shell programming can be done through bash, and complex functions can be accomplished through shell scripting.


This article is from the "thick Product Thin Hair" blog, please make sure to keep this source http://joedlut.blog.51cto.com/6570198/1825961

Shell of Linux Basics (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.