Cisco IOS command line resources

Visual representation of the command line hierarchy

Terminal prompt examples

Router> User EXEC mode
Router# Privileged EXEC mode
Router(config)# Configuration mode (notice the # sign indicates this is accessible only at privileged EXEC mode)
Router(config-if)# Interface level within configuration mode
Router(config-router)# Routing engine level within configuration mode
Router(config-line)# Line level (vty, tty, async) within configuration mode
> ROM monitor mode

Useful keyboard shortcuts

Command Editing Keys and Functions

Keys Function Summary Function Details Example
Tab Complete command Completes a partial command name entry. When you enter a unique set of characters and press the Tab key, the system completes the command name. If you enter a set of characters that could indicate more than one command, the system beeps to indicate an error.
To view the commands which match the set of characters you have entered, enter a question mark (?) immediately following the partial command (no space). The CLI will then list the commands that begin with that string.
tab complete
Return
(at the command line)
Execute Executes the command. execute command
Return
(at the –More– prompt)
Continue Displays the next line of output. single line browsing by pressing enter
Space Bar
(at the –More– prompt)
Continue Displays the next screen of output. The amount of output you see will depend on the screen depth setting of your terminal. browsing more lines using space
Delete or Backspace Backspace Erases the character to the left of the cursor. deleting characters using backspace
Left Arrow or Ctrl-B Back character Moves the cursor one character to the left.
When you enter a command that extends beyond a single line, you can press the Left Arrow or Ctrl-B keys repeatedly to scroll back toward the system prompt and verify the beginning of the command entry.
moving back a character at a time
Right Arrow1 or Ctrl-F Forward character Moves the cursor one character to the right. moving forward a character at a time
Esc, B Back word Moves the cursor back one word. moving back a word at a time
Esc, F Forward word Moves the cursor forward one word. moving forward a word at a time
Ctrl-A Beginning of line Moves the cursor to the beginning of the line. moving to the begining of the line
Ctrl-E End of line Moves the cursor to the end of the command line. moving to the end of the line
Ctrl-D Delete character Deletes the character at the cursor. delete a character at a time
Esc, D Delete next word Deletes from the cursor to the end of the word. Deletes from the cursor to the end of the word.
Ctrl-W Delete previous word Deletes the word to the left of the cursor. delete previous word
Ctrl-K Delete line forward Deletes all characters from the cursor to the end of the command line. deleting characters from the cursor to the end of the command line.
Ctrl-U or Ctrl-X Delete line backward Deletes all characters from the cursor back to the beginning of the command line. deleting characters from the cursor back to the beginning of the command line.
Ctrl-T Transpose characters Transposes the character to the left of the cursor with the character located at the cursor. Transposes the character to the left of the cursor with the character located at the cursor.
Ctrl-R or Ctrl-L Redisplay line Redisplays the system prompt and command line. Redisplays the system prompt and command line.
Ctrl-V or Esc, Q Ignore editing Inserts a code to indicate to the system that the keystroke immediately following should be treated as a command entry, not as an editing key.
Up Arrow1 or Ctrl-P Previous command Recalls commands in the history buffer, beginning with the most recent command. Repeat the key sequence to recall successively older commands. Recalls commands in the history buffer, beginning with the most recent command. Repeat the key sequence to recall successively older commands.
Down Arrow1 or Ctrl-N (next) Next command Returns to more recent commands in the history buffer (after recalling commands with the Up Arrow or Ctrl-P). Repeat the key sequence to recall successively more recent commands. Returns to more recent commands in the history buffer (after recalling commands with the Up Arrow or Ctrl-P). Repeat the key sequence to recall successively more recent commands.
Ctrl-Y Recall last deleted command Recalls the most recent entry in the delete buffer. The delete buffer contains the last ten items you have deleted or cut. Ctrl-Y can be used in conjunction with Esc Y. Redisplays the system prompt and command line.
Esc, Y Recall next deleted command Recalls the next entry in the delete buffer. The delete buffer contains the last ten items you have deleted. Press Ctrl-Y first to recall the most recent entry. Then press Esc Y up to nine times to recall the remaining entries in the buffer. If you bypass an entry, continue to press Esc Y to cycle back to it. Recalls the next entry in the delete buffer.
Esc, C Capitalize word Capitalizes the word from the cursor to the end of the word. Capitalizes the letter under the cursor then moves the end of the word.
Esc, U Make word uppercase Changes all letters from the cursor to the next space on the line appear in uppercase letters. Changes all letters from the cursor to the next space on the line appear in uppercase letters.
Esc, L Make word lowercase Changes the word to lowercase from the cursor to the end of the word. Changes the word to lowercase from the cursor to the end of the word.