Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

On a server when I login as root I see .bashrc (ubuntu 10.10).

On my Mac I have a .bash_profile, does ubuntu always have only a .bashrc file and not .bash_profile? (just confused so asking, I realize they are different o/s's but maybe there is a relationship somehow?)

On my server, I want to create an alias, should I put it in .bashrc?

What if I want this alias to be applied so all users can use it?

share|improve this question
possibly duplicate of: askubuntu.com/questions/1528/bashrc-or-bash-profile -- I'd recommend you to change your question to just ask where to put aliases globally. –  user2817 Apr 12 '12 at 17:09

1 Answer 1

up vote 5 down vote accepted

Here's some nice reading on it. ".bash_profile is executed for login shells, while .bashrc is executed for interactive non-login shells"

So for your alias, use .bash_profile

share|improve this answer

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.