Cisco: Making long commands short with aliases
How to configure aliases for frequently used commands.
If you’re like you me you hate typing in long commands over and over… and over… and over.
Instead of typing sh ip int br all the time wouldn’t it be nice to just type sib? You can do it just by configuring an alias.
In configure mode enter:
alias exec sib Show ip Int Brief
hit enter and exit config mode. Now type sib and you should get the output from the show ip interface brief command. Note that the odd capitalization isn’t needed, it’s just a thing I do to help me remember what the alias is doing.
You can pipe it just like you could normally, so sib | i down will show only lines with “down” in the text. If you type sib, add a SPACE and then hit TAB the alias will be expanded to Show ip Int Brief.
You could alias create aliases like:
alias exec sibd Show ip Int Brief | include down *down
That will show you only interfaces that have “down”, some spaces, and “down” again. If you’ve got a router/switch with a hundred or more interfaces this is a quick way to look for the one with the problem.
Alias exec isn’t the only option, it’s also possible to create aliases that only work in config mode or config-interface mode. I don’t use them so you’ll to check Cisco.com for more info.
Cisco configures some aliases by default, you can see them, and any you’ve configured, with the command: show alias






Add New Comment
Viewing 1 Comment
Thanks. Your comment is awaiting approval by a moderator.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Add New Comment