mediatribe.net -- Drupal and Web Development

Notice: this post was last updated 6 years 27 weeks ago so it might be outdated. Please be cautious before implementing any of suggestions herein.

Using aliases to navigate the command line

I need to have access to several ssh servers, and several paths throughout my working day. I'm a very unsophisticated command line user, so for others out there who would like to tame the command line, here's a trick:

vi ~/.bash_profile

Add, at the very end
alias go-whatever='cd /path/to/whatever'
alias go-client='ssh me@client.com'
#etc.

Then, to make aliases permanent
source ~/.bash_profile

And to list aliases:
alias

This, combined with the use of public-private key pairs, lets me work without (almost) ever having to remember paths, or passwords.