View Single Post
Posts: 26 | Thanked: 3 times | Joined on Jan 2009
#5
Originally Posted by free View Post
Read man bash, section INVOCATION:

* bashrc is not sourced for interactive login shells, only for non-login shells
* profile is source for interfactive login shells


As everything inherits from login shells, the place for $PATH setting is in a profile file (/etc/profile, /etc/bash_profile or ~/.profile, ~/.bash_profile)

Then some distributions do not follow this, they source .bashrc within .profile but it's not a general rule.
I just used to edit .bashrc under centos and it works fine ,so I dont know these stuff...
but I didnt login when I opened a xterminal, why it is a interactive login shell?
 

The Following User Says Thank You to leohart For This Useful Post: