Shell (shell) is the user and the bottom of the operating system (usually the kernel) interaction between the intermediary program, responsible for the user instructions, operations to the operating system at the bottom
Shell is generally divided into: graphical shell (GUI), command line shell (CLI)
Cli:command Line Interface
Gui:graphical User Interface
The general default GUI for Linux is: GNOME, default CLI: BASH
Bash prompt starts with # or $, #代表当前用户为root用户, $ represents the current user as a normal user we can automatically complete the command or file name with the TAB key on the keyboard
Su-Enter root user mode.
SU does not switch terminals, but also in the current directory, Su-switching new terminals.
If you don't know or forget your password, sudo passwd root can reset the root password directly. Direct passwd is to modify the password
Enter exit Exit root mode
sudo for ordinary users, can run as Administrator
Hostname View Host Name
UNAME Displays system information, uname-a all information
The command ID can display information for the current user
~ Represents the Home directory
Ctrl + C terminates the current command
CTRL + C: Send the SIGINT signal, the default process will end, but the process itself can redefine the behavior of receiving this signal.
Ctrl+z: Send sigstop signal, process is just stopped, send Sigcont signal again, process continues to run.
Instead of sending a signal, ctrl-d represents a special binary value that indicates EOF
1, CTRL + C more violent, is to send terminal to the current program, such as you are running a lookup function, files are looking, CTRL + C will force the end of the current process.
2, Ctrl+z is the current program hangs, suspend the implementation of this program, such as you are in the MySQL terminal, need to come out to do some other file operations, and do not want to quit the MySQL terminal (because the next time you have to enter the username password, very troublesome), so you can ctrl+z MySQL hangs, Then do other operations, and then enter FG return can return, of course, can hang a lot of process to the background, and then FG Plus number will be able to suspend the process back to the foreground. Of course, it is very convenient to switch front and rear with BG and FG commands.
3, Ctrl+d is to send an exit signal, not so strong, like Ctrl + C operation, such as you from administrator root back to your ordinary users can be used.
Clear: Clears the terminal screen
Commands are made up of: commands, options, parameters
The TAB key is used to complement the full file (folder) name, command
Press the arrow key "up" or ctrl+p to repeat the last command
Bash records our previous commands and can view all history commands through the history command
Bash can invoke history to simplify operations in the following ways:
!! Repeat previous command
! character repeats the previous command preceded by a specified character
!num execute command by history ordinal
!? ABC repeat the order that contains ABC
!-n Repeat n command before the command
We can search the history command record by CTRL + R.
Esc. (esc+ dot) parameters of the previous command
Command SU can switch users