Introduction  
This Interface Lab gives you the opportunity to use the context-sensitive help, tab-to-complete, and control key capabilities of the Cisco IOS® command-line interface (CLI).

You are working on the Cisco Interactive Mentor simulation environment (CIM-SE) console (displayed in your browser).

 

Step 1 Use the contex-sensitive word help feature.

Context-sensitive word help can be used to obtain a list of commands that begin with a particular character sequence. Enter privileged EXEC mode, and then use word help to see a list of all the commands that begin with "co;" type co followed immediately by ?. Do not include a space before the question mark. The router then displays a list of commands that start with "co."

 

Task Commands
1 Enter the privileged EXEC mode.  enable
2 List the available commands that begin with the letters "co." co?

 

Step 2 Use the context-sensitive command syntax help feature.

Context-sensitive command syntax help can be used to obtain a list of commands, keywords, or argument options that are available, based on the syntax you have already entered. To use command syntax help to see a list of arguments that can be used with the configure command, enter configure, with ? in the place of a keyword or argument. Include a space before the question mark.

 

Task Commands
1 List the available arguments that follow the configure command. configure ?

 

Step 3 Use the command syntax check feature.

If a command is entered improperly (for example, a typo or invalid command option), the command syntax check capability of the Cisco IOS Software will inform you and indicate where the error has occurred. A ^ will appear underneath the incorrect command, keyword, or argument. To use command syntax check to locate an error in a command, enter global configuration mode and then type interface serial 11 (make sure you type "11" instead of "1").

Task Commands
1 Enter global configuration mode.  configure terminal
2 Attempt to access interface serial 11, which does not exist. interface serial 11

 

 

Step 4 Explore command abbreviation.

Commands and keywords can be abbreviated to the minimum number of characters that identifies a unique selection. For example, you can abbreviate the configure command to conf because configure is the only command that begins with conf. You could not abbreviate the command to con because more than one command could fit this criterion. To use word help to find the minimum number of characters needed to identify the interface command, type i at the prompt. When informed that this is an ambiguous command, use word help to see a list of all commands beginning with "i" by typing i? at the prompt. Notice that the interface command is the only command that has an "n" as its second letter. To verify that the interface command can be abbreviated with in, enter in ? at the prompt to use command syntax help to see a list of arguments that can be used with the command.

Task Commands
1 Attempt to enter the abbreviated command "i." i
2 List the commands that begin with the letter "i." i?
3 Verify that the interface command is the only command beginning with the letters "in." in ?

 

 

Step 5 Explore the tab-to-complete feature.

Let's use another editing feature of the Cisco IOS Software. While the characters "in," from the previous lab step, are still being displayed at the prompt, press the Control key, and while holding the Control key down, type "u." The Control-U key combination, abbreviated "Ctrl-U," erases whatever is displayed on the current, active prompt line in the Cisco IOS Software. Control key combinations, such as Ctrl-U, are called "hot keys." Continuing with command abbreviation, another way to find the minimum number of characters that uniquely identifies a command is to use the tab-to-complete feature of the Cisco IOS Software. For example, type li at the prompt and then press the tab key. The tab-to-complete feature will expand the entry "li" to line, because line is the only command that begins with "li." Use the Ctrl-U hot key to delete the line command from the prompt line. Now try typing i at the prompt and then press the tab key. The tab-to-complete feature will not expand this entry, because, as we discovered in the previous lab step, i is an ambiguous command. Now type n after the i still displayed at the prompt and then press the tab key. The tab-to-complete feature will expand this entry to interface, because that is the only command that begins with "in."

Task Commands
1 Erase the current line using the Ctrl-U hot key. Ctrl-U
2 Expand the phrase "li" into the line command using the tab-to-complete feature. li<tab>
3 Erase the current line using the Ctrl-U hot key. Ctrl-U
4 Attempt to expand the letter "i" into a valid command using the tab-to-complete feature. i<tab>
5 Expand the phrase "in" into the interface command using the tab-to-complete feature. in<tab>

 

 

Step 6 Explore other available hot keys.
You have already learned about the Ctrl-U hot key. The following table offers a comprehensive list of the hot keys and some other keyboard editing functions.

Hot Key Function
Delete  - Removes one character to the right of the cursor.
Backspace  - Removes one character to the left of the cursor.
TAB - Finishes a partial command.
Ctrl-A - Moves the cursor to the beginning of the current line.
Ctrl-R - Redisplays the current line.
Ctrl-U - Erases a line.
Ctrl-W - Erases a word.
Ctrl-Z - Ends configuration mode and returns to the EXEC mode.
Up Arrow  - Allows user to scroll forward through former commands.
Down Arrow  - Allows user to scroll backward through former commands.

Use the Ctrl-R hot key to redisplay the current line in the Cisco IOS Software. Then use the Ctrl-A hot key to move the cursor to the beginning of the current line. Then use the Up arrow key on the keyboard to move backwards through the commands in the command buffer—that is, the commands that have been used since entering privileged EXEC mode. Note that a few of the commands you entered in privileged EXEC mode don't appear in the buffer. These are the commands you deleted from the command line with the Ctrl-U hot key; the deletion also removes those commands from the command buffer. You can use the Down arrow key to move forward through the buffer. After inspecting the contents of the buffer, use the arrow keys to display "interface serial 11" at the prompt. This was a command with an intentionally invalid parameter, used to demonstrate the command syntax check capability of the Cisco IOS Software. Use the Ctrl-W hot key twice, to delete the last two words in this command. Then enter "ethernet 0" after the interface command, and go into interface configuration mode for the first Ethernet interface. Finally, use the Ctrl-Z hot key to return to privileged EXEC mode.

Task Commands
1 Redisplay the current line using the Ctrl-R hot key. Ctrl-R
2 Move the cursor to the beginning of the current line using the Ctrl-A hot key. Ctrl-A
3 Use the Up arrow to cycle through previous commands in the command buffer. <up-arrow>
4 Use the Up and Down arrows until "serial interface 11" is displayed at the prompt. <up-arrow> AND/OR <down-arrow>
5 Use the Ctrl-W hot key twice to erase the last two words of the command displayed. Ctrl-W, Ctrl-W
6 Enter interface configuration mode for the ethernet 0 interface. interface ethernet 0
7 Exit to privileged EXEC mode using the Ctrl-Z hot key. Ctrl-Z

 

 

Step 7 You have now completed the lab.
You are finished with this CIM lab. Close the CIM-SE window and continue with the next section of this CIM.

 

All contents are Copyright © 2000-2002 Cisco Systems, Inc. All rights reserved. Important Notices and Privacy Statement.