Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.
alias py='python'

Do I put that in my .bashrc?

share|improve this question

3 Answers 3

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

share|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

share|improve this answer

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

share|improve this answer
Or just $ source ~/.bashrc. – EEAA 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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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