linux command line cursor

Apple Keyboard

Ctrl combination

Jump operation

Between words Jump: Alt + Left / Right

Cursor one character: Ctrl + b

The cursor one character: Ctrl + f

Jump to beginning of the line: Ctrl + a

Jump to end of line: Ctrl + e

Deletion

Delete text before the cursor: Ctrl + u

Delete the cursor after the text: Ctrl + k

Delete the word before the cursor: Ctrl + w

Delete the character under the cursor: Ctrl + d

Before deleting the cursor one character: Ctrl + h

Other operations

Undo: Ctrl + y

Exit the current shell process: Ctrl + d

Clear the screen: Ctrl + l

Before the search command: Ctrl + r

Exchanging two characters before the cursor: Ctrl + t


esc combination

After the cursor is deleted word: esc + d

Cursor right one word: esc + f

Cursor one word: esc + b

Exchanging two characters before the cursor: Ctrl + t


Guess you like

Origin blog.51cto.com/suyanzhu/2403491