alias py='python'

Do I put that in my .bashrc?

link|improve this question

feedback

3 Answers

up vote 5 down vote accepted

Yes if you want to work for your use only then yes .bashrc is the right file. If you want it to work globally add it in /etc/bash.bashrc

link|improve this answer
feedback

If you have a lot of aliases it can be a good idea to have a special file for them (like ~/.bash.aliases) and source that in your ~/.bashrc

link|improve this answer
feedback

Yes. Don't forget to reopen your session. :-)

link|improve this answer
Or just $ source ~/.bashrc. – ErikA Jul 11 '10 at 0:46
Or just $ . ~/.bashrc – Nerdling Jul 11 '10 at 2:18
Yes, sure :) Or just execute the same command in the shell. – Andrejs Cainikovs Jul 12 '10 at 8:24
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.