I have installed g++
package on Cygwin. so I see the following output in Cygwin:
Input:$ which g++
Output: /cygdrive/c/mingw-w64/x86_64-6.2.0-posix-seh-rt_v5-rev1/mingw64/bin
I have also installed openssh
package on Cygwin and configured an ssh server. However, when I connect remotely to my Cygwin I have the following output:
Input:$ which g++
Output: no g++ in (/usr/local/bin:/usr/bin:/bin:/cygdrive/c/Program Files (x86)/Common Files/Intel/Shared Libraries/redis ....
How can I resolve the above issue? Is there any specific ./bash_profile
file that is loaded in the case of remote ssh to Cygwin? If yes, can I fix the issue by adding the following line to this ./bash_profile
:?
export PATH=$PATH:/cygdrive/c/mingw-w64/x86_64-6.2.0-posix-seh-rt_v5-rev1/mingw64/bin
~/.bashrc
is not read for login shells. However, I changed the PATH in~/.bashrc
and the login bash shell is reading that. I think this is another weird behavior of Cygwin. – Admia Jan 13 '17 at 21:51.bash_profile
that loads.bashrc
. Put thePATH
change in.bash_profile
. – Gilles 'SO- stop being evil' Jan 14 '17 at 13:25.bash_profile
loads.bashrc
. – Admia Jan 14 '17 at 13:35