1

I've put a .bash_login file in my $HOME-directory but it doesn't execute. I've also tried .bash_profile but also doesn't work. There are also

  • .profile
  • .bash_history
  • .bash_logout

Any idea? I'm using Crunchbang 10 Statler.

binW
  • 13,034

1 Answers1

4

Bash only looks for .bash_login or .profile files if it is executed as interactive login shell. When it is executed as interactive non-login shell it reads .bashrc. Commonly it is the second case i.e when you run gnome-terminal bash is run as non-login shell. Applications->Accessories->Terminal is a menu entry for gnome-terminal.

binW
  • 13,034
  • Just to add a bit to this; http://mywiki.wooledge.org/DotFiles explains this more in detail, along with the history of why it is like this. In short, put environment variables (export MYVAR=value) in ~/.profile, and functions and aliases in ~/.bashrc. – geirha Jan 21 '11 at 08:28