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)