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

, which in turn executes ~/.bash_aliases:

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

and ps -p $$ shows

31662 pts/0 00:00:00 bash

Do I have something misconfigured?

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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