When tmux starts or opens a new window, it does not load my .profile or .bashrc. I end up typing . ~/.bashrc every time. Is there a way to make this happen automatically?
When tmux starts or opens a new window, it does not load my .profile
Share
Yes, at the end of your
.bash_profile, put the line:This automatically sources the rc file under those circumstances where it would normally only process the profile.
The rules as to when
bashruns certain files are complicated, and depend on the type of shell being started (login/non-login, interactive or not, and so forth), along with command line arguments and environment variables.You can see them in the
man bashoutput, just look forINVOCATION– you’ll probably need some time to digest and decode it though 🙂