Gwynbleidd Gwynbleidd - 27 days ago 7
Bash Question

Is there any functional difference between .bashrc and .bash_rc?

Is there any difference(functionality) between .bashrc and .bash_rc other than the underscore in the filename? Most of the webpages that I visit say .bashrc but the file in my mac happens to be named .bash_rc .(I did create the file but I forgot the origin).

Answer

.bash_rc has no special meaning to bash whatsoever: Unless you've gone out of your way to configure your shell to read it, its presence will have no effect.

Check that it isn't referenced by the ENV environment variable, and consider using:

PS4=':${BASH_SOURCE}:${LINENO}+' bash -ix

...to track every line run during shell invocation, logged next to the filename and line number it came from; you can thusly identify exactly what's causing any given line to be executed by tracing upward from same.