I am connecting to the same Ubuntu server using the same username and key file.
When I login via Putty the $PATH
variable looks like this:
echo $PATH
/home/csrhub/.rvm/gems/ruby-2.3.7/bin:/home/csrhub/.rvm/gems/ruby-2.3.7@global/bin:/usr/share/rvm/rubies/ruby-2.3.7/bin:/usr/share/rvm/bin:/home/csrhub/.rbenv/shims:/home/csrhub/.rbenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
When I login via Vscode (Remote-SSH: Connect to Host...) $PATH
looks different:
~$ echo $PATH
/home/csrhub/.rbenv/bin:/home/csrhub/.rvm/gems/ruby-2.0.0-p648/bin:/home/csrhub/.rvm/gems/ruby-2.0.0-p648@global/bin:/usr/share/rvm/rubies/ruby-2.0.0-p648/bin:/home/csrhub/.vscode-server/bin/26076a4de974ead31f97692a0d32f90d735645c0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/share/rvm/bin
And the Ruby version is different.
whoami
prints the same on both (Putty and VsCode). I also run both echos in the same working directory.
~/.bash_rc
seems to be loaded because the aliases defined there are recognized by both shells
I would like to see the VsCode terminal $PATH
to look like in the putty.
Do you know where the difference comes
* EDIT *
The difference I find is when checking the shell type:
Running Vscode command:
shopt -q login_shell && echo 'Login shell' || echo 'Not login shell'
prints out: Not login shell
While running the same command on putty
prints out:
Login shell