Hot Keys and Shortcuts
The IOS CLI provides hot keys and shortcuts that make configuring, monitoring, and troubleshooting easier.
The figure shows most of the shortcuts. The following are worthy of special note:
Tab - Completes the remainder of the command or keyword
Ctrl-R - Redisplays a line
Ctrl-Z - Exits configuration mode and returns to the EXEC
Down Arrow - Allows user to scroll forward through former commands
Up Arrow - Allows user to scroll backward through former commands
Ctrl-Shift-6 - Allows the user to interrupt an IOS process such as ping or traceroute
Ctrl-C - Aborts the current command and exits the configuration mode
Examining these in more detail:
Tab - Tab complete is used to complete the remainder of abbreviated commands and parameters if the abbreviation contains enough letters to be different from any other currently available commands or parameters. When enough of the command or keyword has been entered to appear unique, press the Tab key and the CLI will display the rest of the command or keyword.
This is a good technique to use when you are learning because it allows you to see the full word used for the command or keyword.
Ctrl-R - Redisplay line will refresh the line just typed. Use Ctrl-R to redisplay the line. For example, you may find that the IOS is returning a message to the CLI just as you are typing a line. You can use Ctrl-R to refresh the line and avoid having to retype it.
In this example, a message regarding a failed interface is returned in the middle of a command.
Switch#show mac-
16w4d: %LINK-5-CHANGED: Interface FastEthernet0/10, changed state to down
16w4d: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/10, changed state to down
To redisplay to line that you were typing use Ctrl-R:
Switch#show mac
Ctrl-Z - Exit configuration mode. To leave a configuration mode and return to privileged EXEC mode, use Ctrl-Z. Because the IOS has a hierarchal mode structure, you may find yourself several levels down. Rather than exit each mode individually, use Ctrl-Z to return directly to the privileged EXEC prompt at the top level.
Up and Down arrows - Using previous commands. The Cisco IOS software buffers several past commands and characters so that entries can be recalled. The buffer is useful for reentering commands without retyping.
Key sequences are available to scroll through these buffered commands. Use the up arrow key (Ctrl P) to display the previously entered commands. Each time this key is pressed, the next successively older command will be displayed. Use the down arrow key (Ctrl N) to scroll forward through the history to display the more recent commands.
Ctrl-Shift-6 - Using the escape sequence. When an IOS process is initiated from the CLI, such as a ping or traceroute, the command runs until it is complete or is interrupted. While the process is running, the CLI is unresponsive. To interrupt the output and interact with the CLI, press Ctrl-Shift-6.
Ctrl-C - This interrupts the entry of a command and exits the configuration mode. This is useful when entering a command you may decide that you wish to cancel the command and exits the configuration mode.
Abbreviated commands or keywords. Commands and keywords can be abbreviated to the minimum number of characters that identifies a unique selection. For example, the configure command can be abbreviated to conf because configure is the only command that begins with conf. An abbreviation of con will not work because more than one command begins with con.
Keywords can also be abbreviated.
As another example, show interfaces can be abbreviated like this:
Router#show interfaces
Router#show int
You can abbreviate both the command and the keywords, for example:
Router#sh int
Hot Keys and Shortcuts
The IOS CLI provides hot keys and shortcuts that make configuring, monitoring, and troubleshooting easier.
The figure shows most of the shortcuts. The following are worthy of special note:
Tab - Completes the remainder of the command or keyword
Ctrl-R - Redisplays a line
Ctrl-Z - Exits configuration mode and returns to the EXEC
Down Arrow - Allows user to scroll forward through former commands
Up Arrow - Allows user to scroll backward through former commands
Ctrl-Shift-6 - Allows the user to interrupt an IOS process such as ping or traceroute
Ctrl-C - Aborts the current command and exits the configuration mode
Examining these in more detail:
Tab - Tab complete is used to complete the remainder of abbreviated commands and parameters if the abbreviation contains enough letters to be different from any other currently available commands or parameters. When enough of the command or keyword has been entered to appear unique, press the Tab key and the CLI will display the rest of the command or keyword.
This is a good technique to use when you are learning because it allows you to see the full word used for the command or keyword.
Ctrl-R - Redisplay line will refresh the line just typed. Use Ctrl-R to redisplay the line. For example, you may find that the IOS is returning a message to the CLI just as you are typing a line. You can use Ctrl-R to refresh the line and avoid having to retype it.
In this example, a message regarding a failed interface is returned in the middle of a command.
Switch#show mac-
16w4d: %LINK-5-CHANGED: Interface FastEthernet0/10, changed state to down
16w4d: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/10, changed state to down
To redisplay to line that you were typing use Ctrl-R:
Switch#show mac
Ctrl-Z - Exit configuration mode. To leave a configuration mode and return to privileged EXEC mode, use Ctrl-Z. Because the IOS has a hierarchal mode structure, you may find yourself several levels down. Rather than exit each mode individually, use Ctrl-Z to return directly to the privileged EXEC prompt at the top level.
Up and Down arrows - Using previous commands. The Cisco IOS software buffers several past commands and characters so that entries can be recalled. The buffer is useful for reentering commands without retyping.
Key sequences are available to scroll through these buffered commands. Use the up arrow key (Ctrl P) to display the previously entered commands. Each time this key is pressed, the next successively older command will be displayed. Use the down arrow key (Ctrl N) to scroll forward through the history to display the more recent commands.
Ctrl-Shift-6 - Using the escape sequence. When an IOS process is initiated from the CLI, such as a ping or traceroute, the command runs until it is complete or is interrupted. While the process is running, the CLI is unresponsive. To interrupt the output and interact with the CLI, press Ctrl-Shift-6.
Ctrl-C - This interrupts the entry of a command and exits the configuration mode. This is useful when entering a command you may decide that you wish to cancel the command and exits the configuration mode.
Abbreviated commands or keywords. Commands and keywords can be abbreviated to the minimum number of characters that identifies a unique selection. For example, the configure command can be abbreviated to conf because configure is the only command that begins with conf. An abbreviation of con will not work because more than one command begins with con.
Keywords can also be abbreviated.
As another example, show interfaces can be abbreviated like this:
Router#show interfaces
Router#show int
You can abbreviate both the command and the keywords, for example:
Router#sh int
การแปล กรุณารอสักครู่..