Is there a way to change the file that my terminal loads so that it never opens or executes my .bash_profile? But still executes a different file in a different directory?
Thanks!
The simplest thing to do would be to change the contents for your .bash_profile file to contain only:
. /path/to/other/file
You can inhibit reading any default startup file with --noprofile --norc. Additionally you can give bash the location of one startup file using --rcfile file. See man bash for details about these options.
In the file provided by --rcfile you can load the standard files in any way you wish.
But the consequences are, that you have to emulate quite a bit of code to get the behaviour of that shell approximately right in regard to system settings, aliases, completions, standard functions, ... You must be very desperate to go that road.
No - you can pass --noprofile to bash to inhibit reading the .bash_profile file completely, but you can't override the location of the file bash looks for.
From man bash:
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.