由于cisco思科网络设备,
一般都是在命令行里进行配置,
所以使用一些快捷键可以提高你的工作效率,
下面的快捷键可以在cisco路由器,思科交换机,CISCO防火墙中使用,
其中 + 表示同时按的意思:
ctrl + a 跳转到命令行开始
ctrl + e 跳转到命令行末端
ctrl + b 把光标向左移动1个字母,相当于向左箭头
ctrl + f 把光标向右移动1个字母,相当于向右箭头
ctrl + c 退出clearLine
ctrl + d 删除光标右侧的一个字符
ctrl + h 删除光标左侧的一个字符
ctrl + w 删除最后输入的一个单词
ctrl + i 刷新当前行并将光标移至行尾
ctrl + j 回车Return
Ctrl-l or Ctrl-r Redraw the screen at the prompt.
ctrl + m 回车Return
ctrl+ brean 回车,并且是上一个命令显示出来
ctrl + k 删除光标到该行末尾的内容
ctrl + u 删除光标到该行开头的内容
ctrl + n 输入历史缓存里的下一条命令,相当于向下箭头
ctrl + p 输入历史缓存里的上一条命令,相当于向上箭头
esc + b 把光标向后移动一个单词 #好像不行,至少在 cisco packet tracer 中不行
esc + f 把光标向前移动一个单词 #好像不行,至少在 cisco packet tracer 中不行
思科快捷键中的组合字符,
不区分大小写。
Ctrl a e 行首,行尾(ahead,end)
Esc f b 单词首,单词尾
Ctrl f b 移动光标(forward,backwards)
Ctrl u k 剪切光标前所有,剪切光标后所有
Ctrl y 粘贴剪切板 剪贴板上的内容
Ctrl w 删除光标前面一个单词,以空格为界
Ctrl h d 向行首/行尾删除单个字符
Ctrl t 交换光标前2个字符的位置
Esc d 删除光标所在到界线处
Ctrl p/n 上一个/下一个使用的历史命令。 (p:previous n:next )
Esc c u l 首字符大写,全大写,全小写 (将光标移到单词首部)
Ctrl+o,Ctrl+m,相当Enter键。
Ctrl+[ 相当于Esc键。 连续按2次Esc显示所有的支持的终端命令。和按一次tab有啥区别?
Ctrl+i 相当于Tab键(不明白这个功能,为什么能按一个键解决,谁会按两个键?)
移动光标:
1、ctrl+a //光标迅速回到行首
2、ctrl+e //光标迅速回到行尾
3、ctrl+u 删除此处至开始的所有内容
4、ctrl+k 删除此处至末尾的所有内容
5、ctrl+-> 向右移动一个单词
6、ctrl+<- 向左移动一个单词
7、ctrl+w : 由光标位置开始,往左删除单词
8、alt+d : 由光标位置开始,往右删除单词
9、ctrl+y 粘贴使用 Ctrl+W,Ctrl+U 和 Ctrl+K 快捷键擦除的文本
注释:Ctrl -a + Ctrl -k 或 Ctrl -e + Ctrl -u 或 Ctrl -k + Ctrl -u 组合可删除整行
终端:
1)ctrl+shift+T //新建窗口-
2)复制:Ctrl + Shift + C
3)粘贴:Ctrl + Shift + V // 按鼠标滚轮键
4)Alt+数字 //切换终端标签窗口
5)ctrl+l //清屏,并在屏幕最上面开始一个新行
6)ctrl+r //检索使用过的历史命令 (r retrieve)
7)ctrl+c //中断,终结一个前台作业。
8)ctrl+/ //撤消操作,Undo
来自 https://www.qinziheng.com/cisco/8444.htm
https://www.cnblogs.com/naodong/p/8334419.html
https://www.cnblogs.com/linuxmysql/p/16245608.html
Using the Command-Line Interface
This chapter contains the following topics:
• CLI Command Keyboard Shortcuts, on page 2
• Using the Interactive Help Feature, on page 4
CLI Command Keyboard Shortcuts
The table below lists the CLI keyboard shortcuts to help you enter and edit command lines on the controller.
Table 1: CLI Command Keyboard Shortcuts
Action Description Keyboard Shortcut
Change The word at the cursor to lowercase. Esc I
The word at the cursor to uppercase. Esc u
Delete A character to the left of the cursor. Ctrl-h, Delete, or Backspace
All characters from the cursor to the beginning of the Ctrl-u
line.
All characters from the cursor to the end of the line. Ctrl-k
All characters from the cursor to the end of the word. Esc d
The word to the left of the cursor. Ctrl-w or Esc Backspace
Display MORE Exit from MORE output. q, Q, or Ctrl-C
output
Next additional screen. The default is one screen. To Spacebar
display more than one screen, enter a number before
pressing the Spacebar key.
Next line. The default is one line. To display more than Enter
one line, enter the number before pressing the Enter
key.
Enter or Return key character. Ctrl-m
Expand the command or abbreviation. Ctrl-t or Tab
Move the cursor One character to the left (back). Ctrl-b or Left Arrow
One character to the right (forward). Ctrl-f or Right Arrow
One word to the left (back), to the beginning of the Esc b
current or previous word.
One word to the right (forward), to the end of the Esc f
current or next word.
To the beginning of the line. Ctrl-a
To the end of the line. Ctrl-e
Redraw the screen at the prompt. Ctrl-l or Ctrl-r
Action Description Keyboard Shortcut
Return to the EXEC mode from any configuration mode Ctrl-z
Return to the previous mode or exit from the CLI from Exec mode. exit command
Transpose a character at the cursor with a character to the left of the cursor. Ctrl-t
Using the Interactive Help Feature
The question mark (?) character allows you to get the following type of help about the command at the
command line. The table below lists the interactive help feature list.
Table 2: Interactive Help Feature List
Command Description
help Provides a brief description of the Help feature in any command mode.
? at the command Lists all commands available for a particular command mode.
prompt
partial command? Provides a list of commands that begin with the character string.
partial Completes a partial command name.
commandcommand ? Lists the keywords, arguments, or both associated with a command.
command keyword ? Lists the arguments that are associated with the keyword.
Using the help Command
Before you begin
To look up keyboard commands, use the help command at the root level.
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 back up until entering a ‘?’ shows the available options. Two types of
help are available:
1. Full help is available when you are ready to enter a command argument (for example 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 (for example show pr?).
Example:
> help
HELP:
Special keys:
DEL, BS... delete previous character
Ctrl-A .... go to beginning of line
Ctrl-E .... go to end of line
Ctrl-F .... go forward one character
Ctrl-B .... go backward one character
Ctrl-D .... delete current character
Ctrl-U, X. delete to beginning of line
Ctrl-K .... delete to end of line
Ctrl-W .... delete previous word
Ctrl-T .... transpose previous character
Ctrl-P .... go to previous line in history buffer
Ctrl-N .... go to next line in history buffer
Ctrl-Z .... return to root command prompt
Tab,command-line completion
Exit .... go to next lower command prompt
? .... list choices
Using the ? command
Before you begin
To display all of the commands in your current level of the command tree, or to display more information
about a particular command, use the ? command.
command name ?
When you enter a command information request, put a space between the command name and ?.
Examples
This command shows you all the commands and levels available from the root level.
> ?
clear Clear selected configuration elements.
config Configure switch options and settings.
debug Manages system debug options.
help Help
linktest Perform a link test to a specified MAC address.
logout Exit this session. Any unsaved changes are lost.
ping Send ICMP echo packets to a specified IP address.
reset Reset options.
save Save switch configurations.
show Display switch options and settings.
transfer Transfer a file to or from the switch.
Using the partial? command
Before you begin
To provide a list of commands that begin with the character string, use the partial command ?.
partial command?
There should be no space between the command and the question mark.
This example shows how to provide a command that begin with the character string “ad”:
> controller> config>ad?
The command that matches with the string “ad” is as follows:
Using the partial commandBefore you begin
To completes a partial command name, use the partial commandcommand.
partial commandThere should be no space between the command and.
This example shows how to complete a partial command name that begin with the character string “cert”:
Controller >config>certcertificate
Using the command ?
Examples
To list the keywords, arguments, or both associated with the command, use the command ?.
command-name ?
There should be a space between the command and the question mark.
This example shows how to list the arguments and keyword for the command acl:
Controller >config acl ?
Information similar to the following appears:
apply Applies the ACL to the data path.
counter Start/Stop the ACL Counters.
create Create a new ACL.
delete Delete an ACL.
rule Configure rules in the ACL.
cpu Configure the CPU ACL Information
command keyword ?
To list the arguments that are associated with the keyword, use the command keyword ?:
command keyword ?
There should be space between the keyword and the question mark.
This example shows how to display the arguments associated with the keyword cpu:
Controller >config acl cpu ?
Information similar to the following appears:
none None - Disable the CPU ACL- Name of the CPU ACL
来自 https://www.cisco.com/c/en/us/td/docs/wireless/controller/8-5/cmd-ref/b-cr85/using_the_command_line_interface.pdf