It can sometimes be a little confusing where to put customizations for your shell environment. Below are a few tips:
Bash
.bash_profile(when you log in)- Use to run commands that should run only once, such as customizing the
$PATH
- Use to run commands that should run only once, such as customizing the
.bashrc(when you open a shell)- commands that should run every time you launch a new shell. This includes your aliases and functions, custom prompts, history customizations, and so on.
.profile- The
~/.profilefile is read by all shells, while~/.bash_profileonly by Bash.
- The
@khem maybe you want to add tips on zsh ![]()