You are here: Using the CLI > Working in the CLI > Command Line Editing

Command Line Editing

Use the key sequences below to edit the current command line

ctrl–a

ctrl–e

Move the cursor to the beginning of the line
Move the cursor to the end of the line

ctrl–b

ctrl–f

Move the cursor one character to the left
Move the cursor one character to the right

esc–b

esc–f

Move the cursor one word to the left (also left arrow)
Move the cursor one word to the right (also right arrow)

ctrl–h

ctrl-k

esc-d

ctrl-u

Delete the character to the left of the cursor
Delete all characters from the cursor to the end of the line
Delete the word to the right of the cursor
Delete the entire line

ctrl-y

Inserts previously deleted text starting at the cursor

ctrl-t

Transpose the character under the cursor and the character to the left of the cursor

ctrl-l

Redraw the line

ctrl–n

ctrl–p

Display next command from history (also up arrow)
Display last command from history (also down arrow)

Related Topics IconRelated Topics