|
This chapter describes the commands used to enter and exit the various Internetwork Operating System (IOS) configuration command modes. It provides a description of the help command and help features, lists the command editing keys and functions, and details the command history feature.
You can abbreviate the syntax of IOS configuration commands. The router recognizes a command when you enter enough characters of the command to uniquely identifyit.
For user interface task information and examples, see the "Understanding the User Interface" chapter of the Router Products Configuration Guide.
To exit privileged EXEC mode and return to user EXEC mode, enter the disable EXEC command.
disable [level]
level | Privilege level to exit to. |
EXEC
In the following example, entering the disable command causes the system to exit privileged EXEC mode and return to user EXEC mode as indicated by the angle bracket (>):
Router# disable
Router>
To enable enhanced editing mode for a particular line, use the editing line configuration command. To disable the enhanced editing mode, use the no form of this command.
editingThis command has no arguments or keywords.
Enabled
Line configuration
Table 2-1 provides a description of the keys used to enter and edit commands. Ctrl indicates the Control key. It must be pressed simultaneously with its associated letter key. Esc indicates the Escape key. It must be pressed first, followed by its associated letter key. Keys are not case sensitive.
Keys | Function |
---|---|
Tab | 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. Enter a question mark (?) immediately following the partial command (no space). The system provides a list of commands that begin with that string. |
Delete or Backspace | Erases the character to the left of the cursor. |
Return | At the command line, pressing the Return key performs the function of processing a command. At the "---More---" prompt on a terminal screen, pressing the Return key scrolls down a line. |
Space Bar | Allows you to see more output on the terminal screen. Press the space bar when you see the line "---More---" on the screen to display the next screen. |
Left Arrow1 | 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 key repeatedly to scroll back toward the system prompt and verify the beginning of the command entry. |
Right Arrow1 | Moves the cursor one character to the right. |
Up Arrow1 or Ctrl-P | Recalls commands in the history buffer, beginning with the most recent command. Repeat the key sequence to recall successively older commands. |
Down Arrow1 or | Return 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-A | Moves the cursor to the beginning of the line. |
Ctrl-B | Moves the cursor back one character. |
Ctrl-D | Deletes the character at the cursor. |
Ctrl-E | Moves the cursor to the end of the command line. |
Ctrl-F | Moves the cursor forward one character. |
Ctrl-K | Deletes all characters from the cursor to the end of the command line. |
Ctrl-L and Ctrl-R | Redisplays the system prompt and command line. |
Ctrl-T | Transposes the character to the left of the cursor with the character located at the cursor. |
Ctrl-U and Ctrl-X | Deletes all characters from the cursor back to the beginning of the command line. |
Ctrl-V and Esc Q | 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. |
Ctrl-W | Deletes the word to the left of the cursor. |
Ctrl-Y | 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. |
Ctrl-Z | Ends configuration mode and returns you to the EXEC prompt. |
Esc B | Moves the cursor back one word. |
Esc C | Capitalizes the word at the cursor. |
Esc D | Deletes from the cursor to the end of the word. |
Esc F | Moves the cursor forward one word. |
Esc L | Changes the word at the cursor to lowercase. |
Esc U | Capitalizes from the cursor to the end of the word. |
Esc Y | Recalls the next buffer entry. The 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. |
1The arrow keys function only with ANSI-compatible terminals. |
Table 2-2 lists the editing keys and functions of the earlier software release.
Key | Function |
---|---|
Delete or Backspace | Erases the character to the left of the cursor. |
Ctrl-W | Erases a word. |
Ctrl-U | Erases a line. |
Ctrl-R | Redisplays a line. |
Ctrl-Z | Ends configuration mode and returns to the EXEC prompt. |
Return | Executes single-line commands. |
In the following example, enhanced editing mode is disabled on virtual terminal line 3:
line vty 3
no editing
Two daggers (††) indicate that the command is documented in the Cisco Access Connection Guide.
terminal editing††
To enter privileged EXEC mode, use the enable EXEC command.
enable [level]
level | (Optional) Privilege level to log into on the router. |
EXEC
Because many of the privileged commands set operating parameters, privileged access should be password-protected to prevent unauthorized use. If the system administrator has set a password with the enable password global configuration command, you are prompted to enter it before being allowed access to privileged EXEC mode. The password is case sensitive.
In the following example, the user enters the enable command and is prompted to enter a password. The password is not displayed on the screen. After entering the password, the system enters privileged command mode as indicated by the pound sign (#).
Router> enable
Password:
Router#
A dagger (†) indicates that the command is documented in another chapter.
disable
enable password†
To exit configuration mode, use the end global configuration command.
endThis command has no arguments or keywords.
Global configuration
You can also press Ctrl-Z to exit configuration mode.
In the following example, the router name is changed to george using the hostname global configuration command. Entering the end command causes the system to exit configuration mode and return to EXEC mode.
Router(config)# hostname alibaba
george(config)# end
george#
To exit any command mode or close an active terminal session and terminate the EXEC, use the exit command at the system prompt.
exitThis command has no arguments or keywords.
Available in all command modes
When you enter the exit command at the EXEC levels, the EXEC mode is ended. Use the exit command at the configuration level to return to privileged EXEC mode. Use the exit command in interface, line, router, ipx-router, and route-map command modes to return to global configuration mode. Use the exit command in subinterface configuration mode to return to interface configuration mode. You can also press Ctrl-Z from any configuration mode to return to privileged EXEC mode.
In the following example, the user exits subinterface configuration mode to return to interface configuration mode:
Router(config-subif)# exit
Router(config-if)#
The following example shows how to exit an active session.
Router> exit
Two daggers (††) indicate that the command is documented in the Cisco Access Connection Guide.
disconnect††
logout††
To get help for the full set of user-level commands, use the full-help command.
full-helpThis command has no arguments or keywords.
Disabled
Available in all command modes.
The full-help command enables (or disables) an unprivileged user to see all of the help messages available. It is used with the show ? command.
The following example is output for show ? with full-help disabled:
Router> show ?
clock Display the system clock
history Display the session command history
hosts IP domain-name, lookup style, nameservers, and host table
sessions Information about Telnet connections
terminal Display terminal configuration parameters
users Display information about terminal lines
version System hardware and software status
Two daggers (††) indicate that the command is documented in the Cisco Access Connection Guide.
help
terminal full-help††
To display a brief description of the help system, enter the help command.
helpThis command has no arguments or keywords.
Available in all command modes
The help command provides a brief description of the context-sensitive help system.
Enter the help command for a brief description of the help system:
Router#
help
Help may be requested at any point in a command by entering
a question mark '?'. If nothing matches, the help list will
be empty and you must backup until entering a '?' shows the
available options.
Two styles of help are provided:
1. Full help is available when you are ready to enter a
command argument (e.g. 'show ?') and describes each possible
argument.
2. Partial help is provided when an abbreviated argument is entered
and you want to know what arguments match the input
(e.g. 'show pr?'.)
The following example shows how to use word help to display all the privileged EXEC commands that begin with the letters "co":
Router# co?
configure connect copy
The following example shows how to use command syntax help to display the next argument of a partially complete access-list command. One option is to add a wildcard mask. The <cr> symbol indicates that the other option is to press Return to execute the command.
Router(config)# access-list 99 deny 131.108.134.234 ?
A.B.C.D Mask of bits to ignore
<cr>
Two daggers (††) indicate that the command is documented in the Cisco Access Connection Guide.
full-help
terminal full-help ††
size number-of-lines | (Optional) Specifies the number of command lines that the system will record in its history buffer. The range is 0 to 256. |
10 lines
Line configuration
The history command without the size keyword and the number-of-lines argument enables the history function with the last buffer size specified or with the default of 10 lines, if there was not a prior setting.
The no history command without the size keyword and the number-of lines argument disables the history feature but remembers the buffer size if it was something other than the default. The no history size command resets the buffer size to 10.
The command history feature provides a record of EXEC commands you have entered. This feature is particularly useful for recalling long or complex commands or entries, including access lists.
Table 2-3 lists the keys and functions you can use to recall commands from the command history buffer.
Key | Function |
---|---|
Ctrl-P or Up Arrow1 | Recalls commands in the history buffer in a backward sequence, beginning with the most recent command. Repeat the key sequence to recall successively older commands. |
Ctrl-N or Down Arrow1 | Returns to more recent commands in the history buffer after recalling commands with Ctrl-P or the Up Arrow. Repeat the key sequence to recall successively more recent commands. |
1The arrow keys function only with ANSI-compatible terminals such as VT100s. |
In the following example, virtual terminal line 4 is configured with a history buffer size of 35 lines:
line vty 4
history size 35
Two daggers (††) indicate that the command is documented in the Cisco Access Connection Guide.
show history
terminal history size††
This command has no arguments or keywords.
EXEC
The command history feature provides a record of EXEC commands you have entered. The number of commands the history buffer will record is determined by the history size line configuration command or the terminal history size EXEC command.
Table 2-4 lists the keys and functions you can use to recall commands from the command history buffer.
Key | Function |
---|---|
Ctrl-P or Up Arrow | Recalls commands in the history buffer in a backward sequence, beginning with the most recent command. Repeat the key sequence to recall successively older commands. |
Ctrl-N or Down Arrow | Returns to more recent commands in the history buffer after recalling commands with Ctrl-P or the Up Arrow. Repeat the key sequence to recall successively more recent commands. |
The following is sample output from the show history command, which lists the commands the user has entered in EXEC mode for this session:
Router# show history
help
where
show hosts
show history
Router#
Two daggers (††) indicates that the command is documented in the Cisco Access Connection Guide.
history size
terminal history size ††
Posted: Mon Oct 21 11:16:17 PDT 2002
All contents are Copyright © 1992--2002 Cisco Systems, Inc. All rights reserved.
Important Notices and Privacy Statement.