Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Local .bashrc is not read on startup under MobaXterm Home on Windows

I am using MobaXTerm (Home version 3.0). I have create a direcorty C:\MobaXterm_3.0\home and set in the local configuration (Settings --> Configuration) the home directory to this path. Under this path I have created a .bashrc file with read access for everybody.

However when starting up MobaXterm, the .bashrc file does not get executed. How can I fix this? The MobaXterm docu says that in the Home addition I cannot change the /etc/profile, but the standard /etc/profile does execute ~/.bashrc. So I am a bit at a loss.

ps: I am aware of the answer to "How does one define aliases for use within MobaXTerm local bash shell?" and have created the .bashrc file with the right permissions.

like image 972
halloleo Avatar asked Mar 11 '16 02:03

halloleo


People also ask

How do I enable local terminal in MobaXterm?

Click the "Start local terminal" button to open a terminal window where you can type Linux-like commands. You can have multiple tabs with a different terminal session in each tab.

Where is home MobaXterm on Windows?

This PC\Documents\MobaXterm\home The directory /drives in the terminal corresponds to the root folder of the local disk which is This PC.

Where is home bashrc file?

In most cases, the bashrc is a hidden file that lives in your home directory, its path is ~/. bashrc or {USER}/.


1 Answers

When you launch a local terminal in MobaXterm first time .bash_profile is executed which sets up the required configuration for the initial shell command prompt to work. The idea is to source the .bashrc from the .bash_profile.

if [ -f ~/.bashrc ]; then
   source ~/.bashrc
fi

Add the above lines to your .bash_profile.

Source: http://www.joshstaiger.org/archives/2005/07/bash_profile_vs.html

like image 105
Inian Avatar answered Nov 15 '22 05:11

Inian