Hi! On Thursday 02 October 2003 23:24, Tom Hosiawa wrote: > After updating PATH in .bash_profile of my home directory and rebooting, > the new settings don't take affect. > > I have to run 'source .bash_profile' in a terminal for it to update, > whats causing this?
'man bash' is your friend :-) Here is the relevant part (chapter "INVOCATION" right at the top): --------- start here --------- When bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and executes commands from the file /etc/profile, if that file exists. After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable. The --noprofile option may be used when the shell is started to inhibit this behavior. When a login shell exits, bash reads and executes commands from the file ~/.bash_logout, if it exists. When an interactive shell that is not a login shell is started, bash reads and executes commands from ~/.bashrc, if that file exists. This may be inhibited by using the --norc option. The --rcfile file option will force bash to read and execute commands from file instead of ~/.bashrc. --------- end here --------- An interactive login shell is started, for example, when you login at the login prompt. If you login from xdm (or gdm, kdm or any other X login manager) they do not open a login shell. So when you start your terminal emulator (xterm, eterm, etc.) an interactive non-login shell is started and _only_ .bashrc is read. If you want that your changes take effect immediately you should put your changes into your .bashrc and source .bashrc from .bash_profile . My .bash_profile has just this single line: [ -f ~/.bashrc ] && . ~/.bashrc which says "if a file ~/.bashrc exists then read it". Hope it helps. Cheers, Renat -- [EMAIL PROTECTED] mailing list
