Bash shortcut keys run in Bash shell. Note the following shortcut keys to greatly improve the efficiency of your command line operations. Edit command Ctrl + a: Move to the beginning of the command line Ctrl + e: Move to the end of the command line Ctrl + f: forward by character (right) Ctrl + B: move by character (left) alt + f: move forward by word (right) Alt + B: Move backward by word (left) Ctrl + xx: Move Ctrl + u between the beginning of the command line and the cursor: delete from the cursor to Ctrl + k at the beginning of the command line: delete from the cursor to the end of the command line Ctrl + w: delete from the cursor to the beginning of the Alt + d: delete from the cursor to the end Ctrl + d: Delete the character Ctrl + h: Delete the character Ctrl + y before the cursor: paste to the cursor Alt + c: change the uppercase word Alt + u from the cursor to all uppercase words Alt + l: change from the cursor to all lowercase words Ctrl + t: exchange the cursor and the previous character Alt + t: exchange the cursor and the previous word Alt + Backspace: With Ctrl + w Similarly, there are some differences between separators [thanks to rezilla for correcting] re-Execute Command Ctrl + r: reverse search command history Ctrl + g: Exit Ctrl + p from History Search Mode: previous command Ctrl + n in history: the next command in history Alt +.: Use the last parameter control command of the previous command Ctrl + l: clear screen Ctrl + o: Execute the current command, and select the previous command Ctrl + s: Stop the screen output Ctrl + q: allow screen output Ctrl + c: terminate command Ctrl + z: suspend command Bang (!) Command !!: Execute the previous command! Blah: Execute the latest commands starting with blah, such! Ls! Blah: p: only print the output, not execute! $: The last parameter of the previous command, which is the same as Alt +! $: P: print the output! $ Content! *: All parameters of the previous command! *: P: print the output! * Content ^ blah: Delete the blah ^ foo in the previous command: Replace the blah in the previous command with foo ^ blah ^ foo ^: replace all the blags in the previous command with the foo friendly prompt: Most of the Bash shortcuts described above are only valid in emacs editing mode. If you configure Bash to vi editing mode, the key that follows vi is bound. Bash uses the emacs editing mode by default. If your Bash is not in emacs editing mode, you can set it through set-o emacs. ^ S, ^ Q, ^ C, and ^ Z are processed by the terminal device and can be set using the stty command.