[Contents] [Prev] [Next] [Index] [Report an Error] [No Frames]


Using Keyboard Shortcuts at the Command Line

This chapter provides information about how to use keyboard shortcuts to save time when you enter commands and configuration statements.

In the CLI, you can use keyboard sequences to move around on a command line and edit the command line. You can also use keyboard sequences to scroll through a list of recently executed commands. Table 13 lists some of the CLI keyboard sequences. They are the same as those used in Emacs.

Table 13: CLI Keyboard Sequences  
Category
Action
Keyboard Sequence

Move the Cursor

Move the cursor back one character.

Ctrl+b

Move the cursor back one word.

Esc+b or Alt+b

Move the cursor forward one character.

Ctrl+f

Move the cursor to the beginning of the command line.

Ctrl+a

Move the cursor to the end of the command line.

Ctrl+e

Delete Characters

Delete the character before the cursor.

Delete or Backspace

Delete the character at the cursor.

Ctrl+d

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

Ctrl+k

Delete all characters on the command line.

Ctrl+u or Ctrl+x

Delete the word before the cursor.

Ctrl+w, Esc+Backspace, Alt+Delete, or Alt+Backspace

Delete the word after the cursor.

Esc+d or Alt+d

Insert Recently Deleted Text

Insert the most recently deleted text at the cursor.

Ctrl+y

Redraw the Screen

Redraw the current line.

Ctrl+l

Display Previous Command Lines

Scroll backward through the list of recently executed commands.

Ctrl+p or up arrow

Scroll forward through the list of recently executed commands.

Ctrl+n or down arrow

Search the CLI history in reverse order for lines matching the search string.

Ctrl+r

Terminate a search, and display the found command.

Esc or Ctrl+j

Abort a search.

Ctrl+g

Repeat Keyboard Sequences

Specify the number of times to execute a keyboard sequence; number can be from 1 through 9.

Esc+number sequence or Alt+number sequence



[Contents] [Prev] [Next] [Index] [Report an Error] [No Frames]