login shell and interactive shell?
Can anyone tell me what are login shell and interactive shell and which configurations each of them read(etc/profile, etc/bashrc, .bash_profile ...)??
I saw some explanation like this: A login shell is one whose first character of argument zero is a -, or one started with the --login option. An interactive shell is one started without non-option arguments and without the -c option whose standard input and error are both connected to terminals (as determined by isatty(3)), or one started with the -i option. PS1 is set and $- includes i if bash is interactive, allowing a shell script or a startup file to test this state.
But this confused more !!!
The man bash command on your system (INVOCATION section) talks about all of this and it describes which files are read when.
Well, if you don't trust the manual page, try using strace.
strace -o/tmp/tr -f bash exit grep open /tmp/tr | grep $HOME
For me, this shows:
18316 open("/home/sethrobertson/.bashrc", O_RDONLY) = 3
What does it show for you?