Cisco IOS Editing Commands

From NetworkChatter

Jump to: navigation, search

Memorizing the Cisco IOS command line editing keys can seem like a tough task. With modern keyboards that have up/down/left/right arrows, we do not find ourselves dependant on these keys. It is difficult to remember them when you are not using them on a daily basis. Here is my thought process behind learning and remembering the keys.


Contents

Forward and Backwards - Characters and Words

Rember that Character=CTRL, Word=ESC, Forward=F, and Backwards=B. The CTRL character keys have been replaced by the use of left/right arrow keys on modern keyboards.

Forward (F) Backwards (B)
Character (CTRL) Ctrl-F

(Same as right arrow)

Ctrl-B

(Same as left arrow)

Word (ESC) Esc-F Esc-B


Beginning of Line/End of Line

Think "A" beginning of alphabet, beginning of line and "E" is for end, end of line.

CTRL-A Beginning of Line
CTRL-E End of Line


Command History

Think "P" is for previous, previously entered commands. Think "N" is for next, or the next commands that were entered. These two keys move you through the command history of previously entered commands. These keys have been replaced by the use of the up/down arrow keys on modern keyboards.

CTRL-P

(Same as up arrow)

Previous Command
CTRL-N

(Same as down arrow)

Next Command


Refreshing an Interrupted Command

Sometimes while typing a command you will get interrupted by a console message that is displayed. This can make it difficult to continue typing if you get distracted by the message and can't remember what you were typing.

CTRL-R Refreshes the current line you were typing

Although CTRL-R is the most common an accepted method of refreshing the current line you are typing, CTRL-L will also work.

On a side note, you can enable permanent line refreshing when a console message is displayed by entering the following command:

Router(config)#line vty 0 4

Router(config-line)#logging synchronous


Other Editing Commands

There are other command line editing keys that can be used. Although they are not commonly used, you can find more information about them on Cisco's home page [1].

Personal tools
Google AdSense