tags : Linux
Config files
.bash_profileand.bashrcare specific to bash- Whereas
.profileis read by many shells in the absence of their own shell-specific config files..profilewas used by the original bourne shell.
Login shells (eg. ssh sessions)
.bash_profileor.profileis read by login shells, along with.bashrctmuxby default runs login shells when you open new panes/windows, you can configure it to spin non-interactive shells- It login shells,
.bashrcis not automatically sourced,.profileor.bash_profileneeds to source it
Sub shells/Non-interactive shells
.bashrcis for non-login shell.- But for subshells,
.bashrcis executed automatically - subshells inherit the parent(login shell’s) environment. So you’d not want to keep setting env vars again and again, so you’d set them in
.bash_profile