If you’ve ever battled various bash profiles to see which one is being used or over ridden, here’s a quick way to troubleshoot.
Note: You can find out what shell you’re using by entering:
echo $SHELL in your terminal.
Let’s say we have two bash files,
~/.bashrc, but you’re not sure which is actually being sourced. Sometimes the
~/.bash_profile references the
~/.bashrc is where everything is being defined.
To start troubleshooting, update your files with the following:
Then in your terminal:
This should give you a starting point for identifying which file is actually being sourced.
Inspired by StackExhange Post