5

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?

1 Answer 1

4

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .