cancel
Showing results for 
Search instead for 
Did you mean: 

XOS: How to create CLI aliases / shortcuts ?

XOS: How to create CLI aliases / shortcuts ?

M_Nees
Contributor III
Is it possible to create command shortcuts for commands which are often used or cumbersome to type in ? Like other major vendors "alias exec scn show cdp neighbor" ?
I guess with recent XOS the scripting feature should make this possible.

If someone use this - it is very welcome.

Regards
9 REPLIES 9

Drew_C
Valued Contributor III
I was asked to come up with some other use cases for exshrc.xsf besides aliases.

I could see this being use for setting session-specific variables.
disable clipaging and configure cli are good examples.

What other ideas does the community have?

Dave_Hammers
Extreme Employee
EXOS 22.3 and later can store commands like 'alias' in a exshrc.xsf script on a switch. This script is run after a successful login, Similar concept to the linux .bashrc file after a linux login.

This is a way to make aliases available to any login by storing the alias commands in this file.

exshrc.xsf is stored in /usr/local/cfg

Because this is a .xsf file and follows the EXOS .xsf scripting rules, the exshrc.xsf file can be any script you would like to run after a login is successful.

Hi Dave,

that is a very very interesting advice not only regarding to aliases.
There a lot of possible use cases.

(This works well ...)

Thanks for emphasing that!

Regards,
Matthias

M_Nees
Contributor III
Review after 2 years!

Since EXOS V22.3 we have the needed command:

https://documentation.extremenetworks.com/exos_22.4/exos_21_1/exos_commands_all/r_alias.shtml

Regards
GTM-P2G8KFN