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.

When I log in to my Ubuntu 12.04 LTS server my bash aliases aren't applied, but if I execute bash from the command line they are.

~/.profile executes ~/.bashrc:

if [ "$BASH" ]; then
  if [ -f ~/.bashrc ]; then
    . ~/.bashrc
  fi
fi

, which in turn executes ~/.bash_aliases:

if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
fi

and ps -p $$ shows

31662 pts/0 00:00:00 bash

Do I have something misconfigured?

share|improve this question

1 Answer 1

So the problem was that I had both a ~/.profile and ~/.bash_profile, and ~/.bash_profile (which was added to the system when I installed RVM, which explains why it worked and then stopped working) did not execute ~/.bashrc.

Bash's man page explains that ~/.bash_profile is checked before ~/.profile, and if it exists, ~/.profile is not executed.

share|improve this answer

Your Answer

 
discard

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.