Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

alter PATH for VS Code Remote SSH

Using VS Code's new Remote SSH feature, how do I modify the PATH environment variable for its terminal? I've ssh'd into an Ubuntu 16.04 VM and it is not picking up /etc/profile or ~/.bash_profile.

enter image description here

After opening the terminal, I can . ~/.bash_profile, but I want something like that to happen automatically.

like image 204
Cameron Taggart Avatar asked May 05 '19 04:05

Cameron Taggart


People also ask

How do I connect to a remote server using SSH in VS Code?

In VS Code, select Remote-SSH: Connect to Host... from the Command Palette (F1, Ctrl+Shift+P) and use the same user@hostname as in step 1. If VS Code cannot automatically detect the type of server you are connecting to, you will be asked to select the type manually.

Can you use VS Code with SSH?

VS Code Remote SSHYou can connect over SSH into another machine from Visual Studio Code and interact with files and folders anywhere on that remote filesystem. If you have an app located on a different computer, you could use SSH to connect to it and access your app, view its files, and even modify, run, and debug it.

How does VS Code connect to remote server?

To connect to your remote machine, you can open this URL on any device. Note: You can also connect to your remote machine directly from vscode.dev: Open the Command Palette ( F1 ) in vscode.dev and run the command Remote Server: Connect to Remote.

How do I connect to a remote server using an SSH key?

To initiate an SSH connection to a remote system, you need the Internet Protocol (IP) address or hostname of the remote server and a valid username. You can connect using a password or a private and public key pair. Because passwords and usernames can be brute-forced, it's recommended to use SSH keys.


1 Answers

You should use this command in command line (F1 or ctrl+shift+p): Remote-SSH: Kill VS Code Server on Host, which let the vscode server to restart and reload you config.

like image 145
yulong_dreamer Avatar answered Oct 10 '22 15:10

yulong_dreamer