可以配置Tmux加载〜/.bashrc而不是〜/.bash_profile吗? [英] Can one configure Tmux to load ~/.bashrc instead of ~/.bash_profile?
问题描述
现在,当我登录到Tmux时,只有〜/.bash_profile
被加载.
Right now, when I log in to Tmux, only ~/.bash_profile
gets loaded.
我希望改为〜/.bashrc
.
有可能吗?
推荐答案
此问题与 tmux
不相关.要解决它,请确保将 source ~/.bashrc
添加到 .bash_profile
就可以了.
This issue is not related to tmux
. To solve it make sure to add source ~/.bashrc
to .bash_profile
and that's it.
您可以在此处了解有关 bash
初始化及其加载的文件和加载顺序的更多信息:
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
如您所见,当以登录模式启动bash时, .bashrc
甚至不在列表中,这就是为什么我们从文件( .bash_profile
)中获取它在列表中.
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.
这篇关于可以配置Tmux加载〜/.bashrc而不是〜/.bash_profile吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!