|
|
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.
Syntax Description
This command has no arguments or keywords.
Default
Enabled.
Command Mode
Line configuration.
Usage Guidelines
Table 5-1 provides a description of the keys used to enter and edit commands. The letters Ctrl indicates the Control key. It must be pressed simultaneously with its associated letter key. The letters Esc indicates the Escape key. It must be pressed first, followed by its associated letter key. Keys are case sensitive.
Table 5-1 : Editing Keys and Functions
| 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
Ctrl-N |
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 from the cursor to the end of the word. |
| 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 to lowercase at the cursor to the end of the word. |
| 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 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. |
Example
In the following example, enhanced editing mode is disabled on line 3.
Switch(config)# line 3 Switch(config-line)# no editing
Related Command
terminal editing
To enter privileged EXEC mode, use the enable EXEC command.
Syntax Description
| level | (Optional) Privileged level to log into on the switch. |
Command Mode
EXEC.
Usage Guidelines
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.
If a password has not been set, it is only possible to us the enable command when using the console line. If a level is not specified, it defaults to the privileged EXEC mode, which is level 15.
Example
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 the user enters the correct password, the system enters privileged command mode as indicated by the pound sign (#).
Switch> enable Password: Switch#
Related Commands
To specify what happens if the TACACS and extended TACACS servers used by the enable command do not respond, use the enable last-resort global configuration command. The no form of this command restores the default.
Syntax Description
| password | Allows you to enable by entering the privileged command-level password. |
| succeed | Allows you to enable without further question. |
Default
Default action is to fail.
Command Mode
Global configuration.
Usage Guideline
The secondary authentication is used only if the first attempt fails. The secondary authentication does not occur if the first authentication is only unsuccessful.
Example
In the following example, if the TACACS servers do not respond to the enable command, the user can enable the system by entering the privileged level password.
Switch(config)# enable last-resort password
Related Command
To configure the enable password for a given level, use the enable password global configuration command. To remove the enable password for a given level, use the no form of this command.
Syntax Description
| level | (Optional) Level for which the password applies. You can specify up to 16 privilege levels, using numbers 0 through 15. Level 1 is normal EXEC-mode user privileges. If this argument is not specified, the privilege level defaults to 15 (traditional enable privileges). |
| encryption-type | (Optional) Type of password encryption. Type 0 to indicate that the password that follows has not yet been encrypted. Type 7 to indicate that the password has been encrypted using Cisco-proprietary encryption. |
| password | Password for the specified level or highest level if none is specified. |
Default
No password is defined.
Command Mode
Global configuration.
Usage Guidelines
Use this command with the level option to define a privilege level. Once the level and the password are specified, give the password to the users who can have access at this level. Use the privilege level (global) configuration command to specify the commands that are accessible at the specified level.
You do not ordinarily enter an encryption type. Typically, you only enter an encryption type if you cut and paste a password that is already encrypted by the system back into this command.
Enable or disable password encryption with the service password-encryption command. If you enter a value for the encryption-type argument but have not enabled encryption, the encryption type is treated as part of the password.
An enable password can contain from 1 to 80 uppercase and lowercase alphanumeric characters, but that the first character cannot be a number. Some spaces are valid password characters; for example, "two words" is valid. Leading spaces are ignored, but trailing spaces are recognized. For example, "woolly " is interpreted as "woolly " (with the space). On the other hand, "woolly" is interpreted as "woolly" (without the space). To create an enable password containing a question mark (?), precede the question mark with keystrokes ^V. For example, to create the password "abc?123", enter the letters abc followed by ^V followed by? followed by the numbers 123. When the system prompts you to enter the enable password, you do not need to precede the question mark with the ^V. For example, you can simply enter abc?123 at the password prompt.
Example
In the following example, the password pswd2 is enabled for privilege level 2.
Switch(config)# enable password level 2 pswd2
Related Commands
disable
enable
privilege level (global)
service password-encryption
show privilege
To enable use of the TACACS to determine whether a user can access the privileged command level, use the enable use-tacacs global configuration command. Use the no form of this command to disable TACACS verification.
Syntax Description
This command has no arguments or keywords.
Default
Disabled.
Command Mode
Global configuration.
Usage Guidelines
When you add this command to the configuration file, the EXEC enable command prompts for a new username and password pair. This pair is then passed to the TACACS server for authentication. If you are using extended TACACS, it also passes any existing UNIX user identification code to the server.
Example
The following example sets TACACS verification on the privileged EXEC-level login sequence.
Switch(config)# enable use-tacacs Switch(config)# aaa new-model
Related Command
To exit configuration mode, use the end global configuration command.
Syntax Definition
This command has no arguments or keywords.
Command Mode
Global configuration.
Usage Guidelines
You can also press ^Z to exit configuration mode.
Example
In the following example, entering the end command causes the system to exit configuration mode and return to EXEC mode.
Switch(config)# end Switch#
To erase a saved configuration, use one of the following erase privileged EXEC commands. The erase startup-config command replaces the write erase command.
Syntax Description
| device: | (Optional) Device containing the file to delete. The colon (:) is required. Valid devices are as follows:
· bootflash: This device is the internal Flash memory. · slot0: This device is the first PCMCIA slot and is the initial default device. · slot1: This device is the second PCMCIA slot on the ASP card. |
| filename | Name of the file to delete. The files can be of any type. You can use wildcards in the filename. A wildcard character (*) matches all patterns. Strings after a wildcard are ignored. |
| startup-config | Erases the startup configuration in memory. |
Default
The initial default device is slot0:. Otherwise, the default device is that specified by the cd command.
Command Mode
Privileged EXEC.
Usage Guidelines
When you use the erase startup-config command, the switch erases or deletes the configuration pointed to by the config_file environment variable. The config_file environment variable specifies the configuration file used for initialization. If the config_file environment variable specifies a Flash memory device and configuration filename, the switch deletes the configuration file. That is, the switch marks the file as "deleted."
The erase [device:]filename command functions like the delete command. That is, when you erase a specific file, the system marks the file as deleted, allowing you to later undelete an erased file. See the delete and undelete commands for more information. If you omit the device, the switch uses the default device specified by the cd command.
If you attempt to erase the configuration file specified by the config_file or BOOTLDR environment variables, the system prompts you to confirm the deletion. Also, if you attempt to erase the last valid system image specified in the BOOT environment variable, the system prompts you to confirm the deletion.
Example
The following example deletes the myconfig file from a Flash memory card inserted in slot 0 of the ASP card.
Switch# erase slot0:myconfig
Related Commands
boot config
cd
delete
show boot
show startup-config
undelete
To define a system escape character, use the escape-character line configuration command. The no form of this command sets the escape character to Break.
Syntax Description
| ascii-number | Either the ASCII decimal representation of the character or a control sequence (Ctrl-E, for example). Ctrl-^ is the default. |
Default
Ctrl-^.
Command Mode
Line configuration.
Usage Guidelines
The Break key cannot be used as an escape character on the console terminal because the operating software interprets Break as an instruction to halt the system. To send the escape character to the other side, press Ctrl-^ twice.
Example
The following example sets the escape character to ^P, which is ASCII character 16.
Switch(config)# line console 0 Switch(config-line)# escape-character 16
To allow an EXEC process on a line, use the exec line configuration command. The no form of this command turns off the EXEC process for the line specified.
Syntax Description
This command has no arguments or keywords.
Default
By default, the switch starts EXECs on all lines.
Command Mode
Line configuration.
Usage Guidelines
When you want to allow an outgoing connection only for a line, use the no exec command. When a user tries to use Telnet to access a line with the no exec command configured, the user gets no response when pressing the return key at the login screen.
Example
The following example illustrates how to turn off the EXEC on line 7. You might want to do this on the auxiliary port if the attached device (for example, the control port of a rack of modems) sends unsolicited data to the switch; an EXEC process starts, making the line unavailable.
Switch(config)# line 7 Switch(config-line)# no exec
To control whether banners are displayed or suppressed, use the exec-banner line configuration command. This command determines whether the switch displays the EXEC banner or the message-of-the-day (MOTD) banner when an EXEC is created. The no form of this command suppresses the banner messages.
Syntax Description
This command has no arguments or keywords.
Default
By default, the messages defined with banner motd and banner exec commands are displayed on all lines.
Command Mode
Line configuration.
Example
The following example suppresses the banner on virtual terminal lines 0 to 4.
Switch(config)# line aux 0 Switch(config-line)# no exec-banner
Related Commands
To configure the character widths of EXEC and configuration command characters, use the exec-character-bits line configuration command.
Syntax Description
| 7 | Selects the 7-bit character set. |
| 8 | Selects the full 8-bit character set for use of international and graphical characters in banner messages, prompts, and so forth. |
Default
The value is 7.
Command Mode
Line configuration.
Usage Guidelines
Setting the EXEC character width to 8 allows you to use special graphical and international characters in banners, prompts, and so forth. However, setting the EXEC character width to 8 bits can cause failures. If a user on a terminal that is sending parity enters the command help, an "unrecognized command" message appears because the system is reading all 8 bits, although the eighth bit is not needed for the help command.
Example
The following example allows full 8-bit international character sets by default, except for the console, which is an ASCII terminal. It illustrates use of the default-value exec-character-bits global configuration command and the exec-character-bits line configuration command.
Switch(config)# default-value exec-character-bits 8 Switch(config)# line 0 Switch(config-line)# exec-character-bits 7
Related Commands
default-value exec-character-bits
default-value special-character-bits
special-character-bits
terminal exec-character-bits
terminal special-character-bits
To set the interval that the EXEC command interpreter waits until user input is detected, use the exec-timeout line configuration command. The no form of this command removes the timeout definition.
Syntax Description
| minutes | Integer that specifies the number of minutes. |
| seconds | (Optional) Additional time intervals in seconds. An interval of zero specifies no timeouts. |
Default
10 minutes.
Command Mode
Line configuration.
Usage Guidelines
If no input is detected, the EXEC command resumes the current connection, or if no connections exist, it returns the terminal to the idle state and disconnects the incoming session.
The no version of this command has the same effect as the exec-timeout 0 command.
Examples
The following example sets a time interval of 2 minutes, 30 seconds.
Switch(config)# line console Switch(config-line)# exec-timeout 2 30
The following example sets a time interval of 10 seconds.
Switch(config)# line console Switch(config)# exec-timeout 0 10
To exit any command mode or close an active terminal session and terminate the EXEC, use the exit command at the system prompt.
Syntax Description
This command has no arguments or keywords.
Command Mode
All.
Usage Guidelines
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 ^Z from any configuration mode to return to privileged EXEC mode.
Examples
In the following example, the user exits interface configuration mode to return to global configuration mode.
Switch(config-if)# exit Switch#
The following example shows how to exit an active session.
Switch# exit
Related Commands
disconnect
enable last-resort
logout
|
|
Copyright 1988-1996 © Cisco Systems Inc.