0

I am pretty new to linux/bash, and I have just recently learned about symlinks. I spend a lot of time at work logging on to various web servers using ssh and our server provider has some horrible long domains. Is it possible to use symlinks in a manner that will allow me to simply type a single designation to ssh to the server?

example:

ln -s ssh customer@host customer

then use 'customer' as a single command to run the ssh command ?

Suraj Rao
  • 627

1 Answers1

1

What you want is an alias. An alias is made like this:
alias somecommand="someotherverylongcommandwithaverylongcommandname thearguments"
Then, you can run somecommand and it will run the other command. To make it permanent, however, you need to edit your ~/.bash_aliases file. Open it in your prefered text editor and put in the alias command. Then, the alias will be set on bash startup.
Note: You may need to create the ~/.bash_aliases file. Also, ~ is the /home/username folder. Also, the . at the beginning means that the file is hidden.