Search code examples
visual-studio-codewindows-10windows-subsystem-for-linux

What is the path of code for wsl, hence Vscode installed in users profile


I have on Windows10 and WSL. vscode is installed on Windows and not on WSL.

When I open WSL and run: code I am getting following error: command not found: code

I have reinstalled vscode and also tried with vscode insider and always checked to add PATH on installation.

The env var PATH does not contain a hint where to look and I also tried "appData/Local/Programs/Microsoft VS Code/bin/code". I am getting an error message: permission denied.


Solution

  • A little bit too late, but in case someone comes here.

    The simplest way is to create a symbolic link in /usr/local/bin

    ln -s '/mnt/c/Program Files/Microsoft VS Code/bin/code' /usr/local/bin/code