Common bash shortcut keys in CentOS
Note the following shortcut keys to greatly improve the efficiency of your command line operations. Edit command Ctrl + a move to command line head Ctrl + e move to command line end Ctrl + f move 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 the beginning of the command line Ctrl + k delete from the cursor to the end of the command line Ctrl + w delete from the cursor to the beginning of the word Alt + d delete from the cursor to the end of the word Ctrl + d Delete the character Ctrl + h Delete the character before the cursor Ctrl + y paste to the cursor after Alt + c from the cursor change the uppercase word Alt + u from the cursor to all uppercase words Alt + l from the cursor to all lowercase words Ctrl + t swap cursor and previous characters alt + t exchange cursor position and previous word Alt + Backspace and Ctrl + wSameSimilarly, there are some differences between separators: Re-execute the command Ctrl + r reverse search command history Ctrl + g exit from the historical search mode Ctrl + p the previous command Ctrl + n the previous command Alt +.: Use the last parameter control command of the previous command Ctrl + l clear screen Ctrl + o to execute the current command, and select the previous command Ctrl + s to stop the screen from outputting Ctrl + q to allow the screen to output Ctrl + c to terminate the command Ctrl + z to suspend the command Bang (!) Command !! Run the previous command! Blah executes the latest commands starting with blah, such! Ls! Blah: p only prints the output and does not execute it! $ The last parameter of the previous command, which is the same as Alt +! $: P Print Output! $ Content! * All parameters of the previous command! *: P prints the output! * Content ^ blah Delete the blah ^ foo in the previous command to replace the blah in the previous command with foo ^ blah ^ foo ^ replace all the blah in the previous command with foo