Involves fast cursor movement under the Linux command line, command editing, post-editing execution history commands, Bang (!) commands, control commands, and so on. Make basher more efficient.
Common Ctrl+key around: jump between words Ctrl+A: Jump to the beginning of the bank CTRL+e: Jump to the end of the page Ctrl+u: Delete the text before the current cursor (as well as the Cut function) Ctrl+k: Delete the text after the current cursor (and also the Cut function) Ctrl+l: Perform clear screen operation Ctrl+y: Paste Ctrl+u or CTRL +K-Cut content Ctrl+W: Delete the character of the word before the cursor alt–d: starts at the cursor position and deletes the word to the right. Delete Move cursor ctrl–a: Move to the beginning of the line ctrl–e: Move to the end of the line ctrl–b: Move back (left) one character ctrl–f: Move backward (right) one character alt–b: Move one word back (left) Alt–f: Move a word back (right) Ctrl –XX: Move between the current cursor and the beginning of the command lineesc-B: Move back (left) one wordesc-f: Move back (right) a word edit command ctrl–h: Delete the character at the left of the cursor ctrl–d: Remove the character to the right of the cursor (note: When the current command line does not have any characters, it will log off the system or end the terminal) ctrl–W: Starts at the cursor position and deletes the word to the left. Delete Alt–d at the beginning of the line: from the cursor position, remove the word to the right. Delete Esc–d at the end of the line: starts at the cursor position and deletes the word until the word ends. Ctrl–k: Removes all characters from the right until the end of the line, starting at the cursor position. Ctrl–u: Starts with the cursor position, removing all characters from the left until the line starts. Ctrl–y: Pastes the previously deleted content into the cursor. Ctrl–t: The position of the swap cursor and the previous two characters. Alt+.: Use the last parameter of the previous command. Ctrl–_: The status before the reply. Undo operation. Ctrl-A + ctrl-k or CTRL-E + ctrl-u or ctrl-k + Ctrl-The U-combination deletes the entire row. Bang (!) Command!!: Executes the previous command. ^foo^bar: Replace Foo in the previous command with bar and execute. !wget: Executes the most recent command that starts with wget. !wget:p: Only the most recent command starting with wget is printed, not executed. !$: The last parameter of the previous command, with Alt-. Same as $_. !*: All parameters of the previous command!*:p: Printing the previous command is all parameters, that is,!*the content. ^ABC: Deletes ABC from the previous command. ^foo^bar: Replace Foo in the previous command with bar^foo^bar^: replace Foo in the previous command with bar!-n: Executes the previous n command, executes the previous command:!-1, the format of executing the first 5 commands is:!-5Find History Command ctrl–p: Displays the previous history command of the current command ctrl–n: Displays the next history command of the current command ctrl–r: The search History command, with the input displaying a match command in the history command, enter key to execute the match command The ESC key is displayed at the command line without executing the matching command. Ctrl–g: Exit from historical search mode (CTRL–R). Control command ctrl–l: Clears the screen and then, at the top, displays the contents of the line where the cursor is currently located. Ctrl–o: Executes the current command and selects the previous command. Ctrl–s: Block screen output ctrl–q: Allow screen output ctrl–c: Abort command ctrl–z: Suspend command Repeat action action esc– operation action: Specifies the number of operations, repeating the specified action.
Linux command line shortcut keys