Ethan Banks On productivity.

OECG – Chapter 24


This last post for the day is a list of keystrokes you can use at an IOS CLI to assist you. I knew all of these except for a few of the “Ctrl” commands towards the end of the list. I use them all the time, and if you’re reading this, probably you use them too.

? – help for all commands

help – how to get help, not the same as ?

command? – all the options available for that command.

com? – all the commands that start with “com”

command parm? – all the parameters that start with “parm”

command parm<tab> – IOS will spell out the rest of “parm”, or do nothing. If it does nothing, that means IOS had more than one choice, and didn’t know what to pick.

command parm ? – all the parameters available at that point in the command

terminal history size <x> – tells IOS to store x commands in the command history. Range of 0 – 256, default to 10.

Up arrow/Ctrl-p – most recent command. Hit it again, and get the next most recent command. Keep going until you run out of commands in the history buffer. p=previous

Down arrow/Ctrl-n – next command, assuming you’ve been going back in the command history. n=next

Left arrow/Ctrl-b – moves the cursor backwards, no delete. b=back

Right arrow/Ctrl-f – move the cursor forward, no delete. f=forward

Backspace – delete the character to the left.

Ctrl-a – beginning of the line

Ctrl-e – end of the line

Esc-b – back one word

Esc-f – forward one word

Ctrl-r – line refresh – shows you a clean command prompt with all the characters you’ve typed in so far. Handy if the router is logging stuff to the console, and wiping out your lines from time to time.

The keystrokes above are for “enhanced editing”, enabled by default. With the “no terminal editing” command, you can disable enhanced editing mode, which may be desirable if you’re using a scripting language like Expect to run commands on the router via Telnet.

By Ethan Banks
Ethan Banks On productivity.

You probably know Ethan Banks because he writes & podcasts about IT. For example, he co-authored "Computer Networks Problems & Solutions" with Russ White.

This site is Ethan on productivity--not tech so much.

Find out more on his about page.