View Full Version : Alias Question
xxarmoxx
Jun 13, 2007, 12:14 PM
I want to create an alias so when I type "con" it does the following command: ssh myserver.com
how can I do this?
GimmeSlack12
Jun 13, 2007, 12:20 PM
When you type "con" where? I'm assuming your wanting a Terminal alias command? Explain a little more please.
xxarmoxx
Jun 13, 2007, 12:30 PM
yes, through the terminal, forgot to mention that
mkrishnan
Jun 13, 2007, 12:37 PM
It's pretty simple. Follow these directions:
http://ncyoung.com/entry/396
In bash, the alias command looks like this:
alias goQuick="cd /some/really/really/long/path/you/do/not/want/to/type"
Put this in ~/.bash_profile then log out and log back in. Now you can use goQuick as a shortcut to that long command. Awesome!
You can edit .bash_profile with 'pico ~/.bash_profile' or probably with 'open ~/.bash_profile'
xxarmoxx
Jun 13, 2007, 01:11 PM
sweet, that worked. Thanks
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.