Lost Password?
No account yet? Register

Main Menu

Home
News
FAQs
Deals














Online Stores
1-800-Flowers.com
1-800-PetMeds
3balls Golf
A.B.Lambdin.com
A1wireless.com
Alienware
Amazon
Apple iTunes
Apple Store
AT&T
AutoAnything.com
Babies R Us
Blinds.com
Buy.com
firstSTREET
Fleurop.com
FTD Flowers
Fujitsu
Iomega
JRROSES.com
McAfee
Mozy
Netflix
Overstock.com Auctions!
Overstock.com
ProFlowers
Sharper Image Outlet
Tech Depot
TextbookX
TigerDirect
Toys"R"Us
Vonage
Wal-Mart
WorldFlowers
Home arrow FAQs arrow CISCO IOS - IOS Shell
CISCO IOS - IOS Shell PDF Print E-mail
Written by Chris Ghokasian   
Monday, 28 August 2006

Making The IOS Shell Work For You

For those of you who consider UNIX to be an easy and user-friendly thing,
you will be pleased to note that the creators of the Cisco IOS liked UNIX.

If you are like the rest of mankind and think of UNIX as User-Hostile,
then take hope from the fact that Cisco doesn't use ALL the UNIX commands.

I have it on good authority that the people who designed the Cisco IOS
liked to use the BASH Shell, a UNIX shell that is fairly polite.

And they very much liked using the standard editing program "vi".
(which may stand for "Variable Insanity" or "Very Intense"...)

Anyway, if you've worked for years with BASH shells and "vi" you're in luck.

If you haven't, here are the simple Operating Instructions.

 

Simple Operating Instructions

CTRL-A goes to the "Beginning" of the Line.

CTRL-E goes to the "End" of the Line.

 CTRL-B go "Back One Character". (can also use LEFT Arrow key)  

CTRL-F go "Forward One Character". (can also use RIGHT Arrow key)  

ESCAPE-B go "Backward to the Beginning of the Next Word".  

ESCAPE-F go "Forward to the Beginning of the Next Word".

Note that using the ARROW Keys is limited to those using a VT-100 Terminal Emulation.

 

Fancy Editing Tricks

If the end of a line goes too long, it will not automatically wrap to the next one.

Instead the Cisco IOS command shell gives you a dollar sign $.
This indicates that you are an over-achiever and have typed too much,
at least too much to be shown on the screen.

Your line would now look like this:

Router#$ this is a way too long line that is full of sound and fury

Note that the $ goes after the Router Prompt.

If you keep typing is will shift over as you type,
hiding more of the beginning of the sentence.

Router#$long line that is full of sound and fury, signifying nothing!

You can get back to the beginning of your Novel by typing CTRL-A

Router# For Demo Purposes Only this is a long line that is full of $

If you want to you can turn off these Advance Editing Tools
by simplying typing in Terminal No Editing at the prompt.

Since this would be a silly thing to do, please turn them back on
by typing in the two words Terminal Editing.

 

Command History!

Now then, you just typed in a Real Long Command (RLC)
and you realize that you made a mistake in one word
and want a second chance to do it right again.

Well, the Cisco IOS makes this Real Easy!

The Router keeps the last 10 commands you issued in its HISTORY,
which is a special memory Buffer which holds the "Command History".
(note here that a "Buffer" is a memory space for storing things...)

If you are using the VT-100 Emulator we talked about before,
simply do the following.

Press the UP Arrow key to go back to the previous command.

 

Press the DOWN Arrow key to go back to the previous command.
If you are a poor unfortunate without VT-100 you can use these instead:

CTRL-P takes you to the "Previous" command.

 

CTRL-N takes you to the "Next" commands.
Putting the Command show history in at the prompt
gives you the list of the last 10 commands you have typed in.
Router# show history

Command One
Command Two
Command Three
Command Four
Command Five
Command Sixx - (with a mistake!)
Command Six - (fixed now)
Command Eight - "There is No Command 7!"
Command Nine
Command Ten

You can increase the size of your HISTORY buffer by using the command:

Terminal History Size

Router# Terminal History Size 99

The above command would give you 99 commands to play with!

Hope you noticed the SHOW part of the command above,
we will be using a lot more of SHOW commands to look at various things!

Last Updated ( Monday, 28 August 2006 )
 
< Prev   Next >
© 2010 chrisghokasian.com