Xshell Forum

How to create command aliases in xshell

Last post: Thursday, April 14, 2016 6:53 AM by Support, 1 reply

 
Tuesday, April 12, 2016 12:24 AM - Lalit

How to create command aliases in xshell

 
Hi,
I want to know, how to create command aliases in Xshell

I know we can create Quick command buttons to execute commands when a string can be fed to a running ssh session (along with Enter key) but that is not what I am looking for.

There are 2 drawbacks that I have noticed with the "quick command" function:

1. There is a limit to the quick command buttons that you can create under a single "quick command set" which makes the person keep searching for the command that he has to feed on the server and for which he has created a button for.
2. It is difficult to remember exact names of buttons when you are working. But, it is easier to remember aliases like we create in unix.

What I am looking for is if we can create aliases in Xshell (rather than our server's .profile or .bashrc profile) and Xshell can feed those commands when we type in the alias name.
These aliases can be called in using some initial key sequence like example below:

Alias in Xshell:
alias df= "df -h"

we can run it using "Xdf", where X will be the command to call in the aliases created in the Xshell tool and not in the servers login profile. When we type X via xshell it will call the Xshell's command aliases and feed the command associated with the alias further. In this case typing Xdf will feed "df -h" on the server's command prompt and then we can hit enter to execute it.

I am asking this to be implemented since if someone is working on hundreds of servers (or virtual servers that are created dynamically) we cannot build aliases on each and every server individually.
If these aliases are present in Xshell itself, then we can feed it anytime on any server's login prompt and there would be no need to create aliases on each server separately.

Please do reply if you need more explanation to this.

Thanks and Regards

Program Ver. : Xshell 5
Thursday, April 14, 2016 6:53 AM - Support

Re: How to create command aliases in xshell

 
Thanks for the very thorough explanation. I understand what you're looking for and it indeed seems like a very useful feature for people and professionals who deal with a large amount of servers.

Your suggestion has been introduced to our developers and we hope to get it implemented in the future. Thanks!

Technical Support

Like us on Facebook
Follow us on Twitter
Visit our blog Blog