I have recently moved my WSL installation to another drive for disk space sake by using this guide: medium.
After it, when I try to open a remote window on VS Code I get the error:
/mnt/c/Users/User/.vscode/extensions/ms-vscode-remote.remote-wsl-0.88.2/scripts/wslServer.sh: 50: /root/.vscode-server/bin/dc96b837cf6bb4af9cd736aa3af08cf8279f7685/bin/code-server: not found
Actually on /root/.vscode-server
there is no bin directory but I cannot get why.
By using WSL
from a windows prompt it opens normally.
What I messed up?
TLDR: just rename or delete the .vscode-server/ folder in your wsl distro, it must be in the root, otherwise when connecting to wsl, vscode would attempt to install itself on you wsl distro.
I came across a similar situation, I did have the .vscode-server/ folder in the root though.
ATENTION: What I did made me lose my vscode extensions installed in wsl, wasn't a big deal for me but may be for your case.
To solve my issue:
cd ~/.vscode-server
;