Windows 在 MobaXterm Home 下启动时未读取本地 .bashrc
Local .bashrc is not read on startup under MobaXterm Home on Windows
我正在使用 MobaXTerm(家庭版 3.0)。我创建了一个 direcorty C:\MobaXterm_3.0\home
并在本地配置(设置 --> 配置)中将主目录设置为此路径。在此路径下,我创建了一个 .bashrc
文件,每个人都具有读取权限。
但是当启动 MobaXterm 时,.bashrc
文件没有被执行。 我该如何解决这个问题? MobaXterm 文档说在主页添加中我不能更改 /etc/profile
,但标准 /etc/profile
会执行 ~/.bashrc。所以我有点不知所措。
ps:我知道 answer to "How does one define aliases for use within MobaXTerm local bash shell?" 并创建了具有正确权限的 .bashrc
文件。
当您第一次在 MobaXterm 中启动本地终端时,会执行 .bash_profile
,这会为初始 shell 命令提示符设置所需的配置。这个想法是从 .bash_profile
中获取 .bashrc
。
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
将以上行添加到您的.bash_profile
。
来源:http://www.joshstaiger.org/archives/2005/07/bash_profile_vs.html
我正在使用 MobaXTerm(家庭版 3.0)。我创建了一个 direcorty C:\MobaXterm_3.0\home
并在本地配置(设置 --> 配置)中将主目录设置为此路径。在此路径下,我创建了一个 .bashrc
文件,每个人都具有读取权限。
但是当启动 MobaXterm 时,.bashrc
文件没有被执行。 我该如何解决这个问题? MobaXterm 文档说在主页添加中我不能更改 /etc/profile
,但标准 /etc/profile
会执行 ~/.bashrc。所以我有点不知所措。
ps:我知道 answer to "How does one define aliases for use within MobaXTerm local bash shell?" 并创建了具有正确权限的 .bashrc
文件。
当您第一次在 MobaXterm 中启动本地终端时,会执行 .bash_profile
,这会为初始 shell 命令提示符设置所需的配置。这个想法是从 .bash_profile
中获取 .bashrc
。
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
将以上行添加到您的.bash_profile
。
来源:http://www.joshstaiger.org/archives/2005/07/bash_profile_vs.html