Line-Editing Commands

The CLI supports the following line-editing commands. To enter a line-editing command, use the Ctrl+key combination for the command by pressing and holding the Ctrl key and then pressing the letter associated with the command.

CLI Line-Editing Commands

Ctrl+Key Combination

Description

Ctrl+A

Moves to the first character on the command line.

Ctrl+B

Moves the cursor back one character.

Ctrl+C

Escapes and terminates command prompts and ongoing tasks (such as lengthy displays), and displays a fresh command prompt.

Ctrl+D

Deletes the character at the cursor.

Ctrl+E

Moves to the end of the current command line.

Ctrl+F

Moves the cursor forward one character.

Ctrl+K

Deletes all characters from the cursor to the end of the command line.

Ctrl+L; Ctrl+R

Repeats the current command line on a new line.

Ctrl+N

Enters the next command line in the history buffer.

Ctrl+P

Enters the previous command line in the history buffer.

Ctrl+U; Ctrl+X

Deletes all characters from the cursor to the beginning of the command line.

Ctrl+W

Deletes the last word you typed.

Ctrl+Z

Moves from any configuration level of the CLI to the privileged EXEC level; at the privileged EXEC level, moves to the user EXEC level.