VS代码在WSL -2 Ubuntu 18.04服务器中未打开 - 给出命令'代码'未找到
输入代码时,我在WSL中给出了这种错误。
samanthika-137:~/repos/wams$ code .
Command 'code' not found, did you mean:
command 'cde' from deb cde (0.1+git9-g551e54d-1.1build1)
command 'cdde' from deb cdde (0.3.1-1build1)
command 'ode' from deb plotutils (2.6-10build1)
command 'node' from deb nodejs (10.19.0~dfsg-3ubuntu1)
command 'tcode' from deb emboss (6.6.0+dfsg-7ubuntu2)
Try: sudo apt install <deb name>
I have give this type of error in wsl when I type code .
samanthika-137:~/repos/wams$ code .
Command 'code' not found, did you mean:
command 'cde' from deb cde (0.1+git9-g551e54d-1.1build1)
command 'cdde' from deb cdde (0.3.1-1build1)
command 'ode' from deb plotutils (2.6-10build1)
command 'node' from deb nodejs (10.19.0~dfsg-3ubuntu1)
command 'tcode' from deb emboss (6.6.0+dfsg-7ubuntu2)
Try: sudo apt install <deb name>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
由于窗口更新和断开连接而引起的这个问题。
我已经完成了这些步骤
转到Ubuntu Home Directory并删除。 vscode-server

然后转到设置 - &gt;应用 - &gt;搜索ubuntu-&gt;转到高级选项 - &gt;重置 - &gt;维修
service.msc
转到lxsssmanager,然后右键单击并重新启动

现在转到Ubuntu终端并键入
代码。
它将下载vs代码,并且有效
This issue caused because of window update and disconnect.
I have done these steps
Go to ubuntu home directory and delete . vscode-server

Then go to setting -> Apps -> search ubuntu->go to advanced options -> Reset -> Repair
service.msc
Go to LxssManager and right click and restart

Now go to the ubuntu terminal and type
code .
It will download vs code and it works
重新安装Ubuntu软件:
清洁缓存:
更新和升级:
reinstall Ubuntu Software:
Clean the Cache:
update and upgrade: