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?
Best Answer
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.