【发布时间】:2021-12-28 22:12:10
【问题描述】:
Win10、WSL2、Ubuntu vanilla 安装。我有一个在 WSL2 实例中侦听的 SSH 守护程序(在高编号端口上,以防相关)。我刚刚注意到,在安装 VSCode/WSL 远程扩展后,如果我从 Ubuntu 终端/应用程序/本机控制台中执行 code .(对不起,我不知道它的正确名称),它会下载/安装VSCode 服务器,至少到目前为止,它似乎按照我的预期运行。
### launch the "Ubuntu" applet from the normal windows environment....
[lwobker:/dtop/scripts/jumpstamper]$ code .
Updating VS Code Server to version 899d46d82c4c95423fb7e10e68eba52050e30ba3
Removing previous installation...
Installing VS Code Server for x64 (899d46d82c4c95423fb7e10e68eba52050e30ba3)
Downloading: 66%
但是 - 如果我 ssh 进入 WSL 实例(作为同一个用户)并再次输入 code . 然后它不知道我所说的,我得到标准的 Ubuntu “呃,对不起,我不太确定是什么你的意思是”回应:
### SSH into the WSL2 virtual machine...
[lwobker:/dtop/scripts/fun]$ code .
Command 'code' not found, did you mean:
command 'node' from deb nodejs (10.19.0~dfsg-3ubuntu1)
command 'cde' from deb cde (0.1+git9-g551e54d-1.1build1)
command 'cdde' from deb cdde (0.3.1-1build1)
command 'tcode' from deb emboss (6.6.0+dfsg-7ubuntu2)
command 'ode' from deb plotutils (2.6-10build1)
我会认为(显然是错误的)Ubuntu 终端启动的登录 shell 与我使用 SSH 登录到同一虚拟机的登录 shell 相同......但是......显然不是?
【问题讨论】:
标签: visual-studio-code windows-subsystem-for-linux vscode-remote