linuxtmux

Can one configure Tmux to load ~/.bashrc instead of ~/.bash_profile?


Right now, when I log in to Tmux, only ~/.bash_profile gets loaded.

I'd like ~/.bashrc to get called instead.

Is that possible?


Solution

  • This issue is not related to tmux. To solve it make sure to add source ~/.bashrc to .bash_profile and that's it.

    You can learn more about bash initialization and which files it loads and in which order here: https://github.com/sstephenson/rbenv/wiki/Unix-shell-initialization#bash

    As you can see .bashrc is not even on the list when bash is started in login mode, that's why we source it from the file (.bash_profile) that is on the list.