1
alias py='python'

Do I put that in my .bashrc?

Alex
  • 8,471
  • 26
  • 75
  • 99

3 Answers3

5

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

proy
  • 1,229
  • 10
  • 10
2

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

Florian Diesch
  • 1,794
  • 1
  • 11
  • 5
1

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

Andrejs Cainikovs
  • 1,621
  • 1
  • 14
  • 20