Can someone explain the difference between .bashrc and .bash_profile? Examples would be great.
Thank you.
Can someone explain the difference between .bashrc and .bash_profile? Examples would be great.
Thank you.
/.bashrc and ~/.bash_profile are scripts that might be executed when bash is invoked. The ~/.bashrc file gets executed when you run bash using an interactive shell that is not a login shell.
So basically bashrc is run when you run an interactive shell that you're not logged in for and bash_profile is executed when you are a logged in user.
Have a further read here: https://www.quora.com/What-is-bash_profile-and-what-is-its-use