Linux operating system can be divided into shell and kernel two parts, kernel is the kernel, provides the core functions of the operating system. The shell is the shell, which is connected to the kernel (kernel) and the user. This means that the user uses the shell to kernel the function of the body.
The Linux shell is divided into two types, namely the CLI and GUI
Cli:command lines Interface Command line interface
Gui:graphical User Interface GUI
Different Linux distributions may have different GUIs (more common such as gnome), and some systems do not have a GUI, such as the smallest lite version of CentOS. And the CLI is basically provided, if not the user can not be used. Each Linux CLI is basically bash.
You can open the shell using a tool like Xshell, or open a command-line window under the GUI.
In bash, the root user begins with #, and starts with a regular user.
Use the history command in bash to view a bash's historical record. With history, you can simplify bash operations:
Press the UP arrow to display the previous command
Press the down arrow to display the next command
!! Repeat the previous command
! Character repeats a command that begins with "character"
! Num executes the command according to the sequence number of the history record
!? ABC repeats the command containing ABC before
! -N Repeats the command before the n command
Through Ctrl+r, you can search for commands in the history record
Press ESC to press the. Key to repeatedly invoke the arguments in the previous command
To switch users through the SU command in the CLI:
Su-user name
Omitting the user name switches to the root user, each time the user switches to a new runtime environment, so the current directory becomes the user's root directory after each user switch.
The sudo command is to run the command with an administrator
ID to display the current user information
passwd command to change password
Bash Job Management:
If you want a command to run in the background, add a & symbol after the command
Pause and stop programs: CTRL + C is the terminating program, CTRL + Z is the pause program
The jobs command shows the background process
BG Serial Number (the number shown in jobs) keeps the paused process running in the background
FG Sequence number causes background process to foreground
Reprint please indicate the source
Http://blog.csdn.net/redstarofsleep
linux-() Shell in Linux