alias py='python'

Do I put that in my .bashrc?


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

| improve this answer | |

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

| improve this answer | |

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

| improve this answer | |
  • Or just $ source ~/.bashrc. – EEAA Jul 11 '10 at 0:46
  • Or just $ . ~/.bashrc – Jeremy L 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

Your Answer

