Reprinted: Linux command line shortcuts

Common

Ctrl + left and right keys: jump between words

Ctrl + A: jump to the first line of the Bank

Ctrl + E: Skip to footer

Ctrl + U: delete the current cursor in front of all the text (as well as cut function)

Ctrl + K: Delete all text behind the current cursor (also cut function)

Ctrl + L: Clears the screen

Ctrl + Y: Paste Ctrl + U or Ctrl + K content shear

Ctrl + W and Alt + D: the character delete operation for the current word, W delete the word preceding the cursor, D characters following the deleted

Alt + Backsapce: Delete the current word behind the cursor

Explanation

Ctrl + K: Hold down the Ctrl key, then press the K key;

Alt + K: Hold down the Alt key, then press the K key;

Esc + K: first click the Esc key, and then press the K key.

Move the cursor

Ctrl + A: to start of line

Ctrl + E: Position the cursor on

Ctrl + B: back (left) to move a character (equivalent to the left)

Ctrl + F: back (Right) move a character (equivalent to right)

Ctrl + XX :( two X) moves between the command cursor and the end of the line

Alt + B: back (left) one word

Alt + F: next (right) one word

Esc + B: back (left) one word

Esc + F: next (right) one word

Esc + T: exchange two words before the cursor position

Edit command

Ctrl + H: Delete the left of the cursor position character

Ctrl + D: Delete character right of the cursor position (Note: the current command line without any characters, the system will log off or end terminals)

Ctrl + W: starting from the cursor position to the left to delete the word. To the beginning of the line deleted

Alt + D: starting from the cursor position, the right to delete words. Delete to end of line

Esc + D: starting from the cursor position, delete the word, until the end of the word.

Ctrl + K: starting from the cursor position, deletes all characters to the right, until the end of the line.

Ctrl + U: starting from the cursor position, deletes all characters to the left until the start of the line.

Ctrl + Y: Paste the contents to be deleted before the cursor.

Ctrl + T: two switching positions and the character before the cursor.

Alt +:. The final parameter on the use of a command.

Ctrl + _: the state before the reply. Undo.

Ctrl + A + K, or Ctrl + E + U or Ctrl + K + U combination may delete the entire line.

Find command history

Ctrl + P: displays previous history command the current command (equivalent to the key)

Ctrl + N: display a history command current command (corresponding to the button)

Ctrl + R: search command history, command history will be displayed along with the input of a matching command, Enter key to perform the matching command; ESC key to display matching without performing the command line.

Ctrl + G: Exit from the history search mode (Ctrl + R).

control commands

Ctrl + L: clear the screen, then again displays the contents of the line where the cursor is currently at the top.

Ctrl + O: execution of the current command, and select the command.

Ctrl + S: stop screen output

Ctrl + Q: Allow screen output

Ctrl + C: termination command

Ctrl + Z: Suspend command (using the 'fg' command recovery)

Operation is repeatedly performed operations

Esc - operation performance operation count: specifies the number of operations is repeatedly performed a specified operation.

Bang (!) Command

!!: a command execution.

^ Foo ^ bar: the last command in the Replace foo bar, and executed.

! Wget: executes the most recent command that starts with wget.

! Wget: p: print only the most recent command beginning with wget is not executed.

! $: The last argument of the previous command, and Alt - $ _ and the same.

! *: All parameters on a command

! *: P: print command is all on one parameter, namely * content!.

^ Abc: delete a command abc.

^ Foo ^ bar: The last command is replaced with foo bar

^ Foo ^ bar ^: The last command is replaced with foo bar

! -N: n before executing the command, the previous command:! -1, 5 before executing the command format is:! -5

Guess you like

Origin www.cnblogs.com/029zz010buct/p/11236032.html