mediatribe.net -- Drupal et développement web

Notice: this post was last updated Il y a 6 years 27 weeks 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.