I'm having trouble wrapping my head around what belongs in ~/.profile
and what belongs in ~/.bashrc
.
From what I've read, it seems to me that ~/.profile
should be used for environment variables and ~/.bashrc
for aliases, functions, and the like. If I move all my export
statements from ~/.bashrc
to ~/.profile
, would everything work as it should, or am I about to break something?
(Here's my dotfiles repo if you want to look over both files.)
EDIT 2022-06-03: I've moved most of my environment variables from ~/.bashrc
to ~/.profile
and have assured myself that ~/.bash_profile
sources ~/.profile
. The only environment variables I've left in ~/.bashrc
are those that only matter when I'm working in a shell, e.g., those pertaining to less, the prompts, slrn, and the like. Everything seems to be working well. Thanks for the help.