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.
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