Bash
Shell has two popular shortcut key styles: emacs-based and VI-based, and can switch between them.
Set-o vi # Switch to VI Style
Set-O Emacs # Switch to the Emacs Style
It is based on Emacs by default, which I like very much. After all, I don't think I can press ESC by hand ^-^
Delete:
CTRL + H-delete a character, which is equivalent to the "<-" Key
CTRL + D-delete a character. If there are no characters in the command line, exit shell.
CTRL + k-delete all characters after the cursor
CTRL + U-delete all the characters before the cursor. You can use this to rewrite the command.
CTRL + w-delete a word
History:
CTRL + R-search history, which is actually found in the. bash_history File
Clear screen:
CTRL + L-clear screen, equivalent to the command clear
Control:
CTRL + C-terminate command
Tab key:
Here "2 t" indicates pressing the tab twice
~ 2 T-list the current user in/etc/passwd
$2 T-list all environment variables