30 Using the CLI
3
Configure the device and enter the necessary commands to complete the required tasks.
4
When finished, exit the session with the
exit
command.
When a different user is required to log onto the system, use the login Privileged EXEC mode
command. This effectively logs off the current user and logs on the new user.
Editing Features
Entering Commands
A CLI command is a series of keywords and arguments. Keywords identify a command, and arguments
specify configuration parameters. For example, in the command show interfaces status ethernet 1/e11,
show, interfaces and status are keywords, ethernet is an argument that specifies the interface type, and
1/e11 specifies the port.
To enter commands that require parameters, enter the required parameters after the command keyword.
For example, to set a password for the administrator, enter:
Console(config)# username admin password alansmith
When working with the CLI, the command options are not displayed. The command is not selected
from a menu, but is manually entered. To see what commands are available in each mode or within an
interface configuration, the CLI provides a method of displaying the available commands, the command
syntax requirements and in some instances, parameters required to complete the command. The
standard command to request help is the character ?.
There are two instances where help information can be displayed:
•
Keyword lookup
— The character
?
is entered in place of a command. A list of all valid commands and
corresponding help messages are is displayed.
•
Partial keyword lookup
— If a command is incomplete and or the character
?
is entered in place of a
parameter. The matched keyword or parameters for this command are displayed.
To assist in using the CLI, there is an assortment of editing features. The following features are
described:
• Terminal Command Buffer
• Command Completion
• Keyboard Shortcuts
Copying and Pasting Text
Up to 100 lines of text (i.e., commands) can be copied and pasted into the device.
NOTE: This editing features are for Telnet only.
NOTE: It is the user’s responsibility to ensure that the text copied into the device consists of legal commands only.
book.book Page 30 Thursday, December 18, 2008 7:40 PM