If you are a big CLI user, like I am, knowing some of the CLI shortcut key combinations can be a life saver. I was thinking the other day about how much time I save just by using these 5 simple CLI shortcuts. Hopefully if you’ve been working on Cisco as long as I have, you already know all of these but if you don’t, I seriously suggest that you engrain these into memory.
CRTL + A
Moves you to the beginning of a command line
CTRL + E
Moves you to the end of a command line
Up Arrow and Down Arrow
Cycle through previously entered commands
TAB
When you press tab the CLI will complete your command for you as long as you have enough of it entered. For instance, if I type in…
ASA(config)# tu
And the press TAB….
ASA(config)# tunnel-group
It finished the command for me since there is only one global config command that start with ‘tu’.
Auto recognition
If you don’t want to press TAB you can simply enter as much of the command as you want and press enter. The CLI will fill in the blank for you so long as there is enough info entered for it to pick the right command. For instance….
ASA(config)# tu GP_Administrators t r
Is the exact same as….
ASA(config)# tunnel-group GP_Administrators type remote-access
While this is a server example it works. If you don’t have enough of a command entered you’ll get…
ERROR: % Ambiguous command
Which is the CLI asking you to enter more information so it can pick the right command.