visual-studio-code - wsl 的代码路径是什么,因此 Vscode 安装在用户配置文件中

标签 visual-studio-code windows-10 windows-subsystem-for-linux

我有 Windows10 和 WSL。
vscode 安装在 Windows 上而不是 WSL 上。

当我打开 WSL 并运行时:code我收到以下错误:command not found: code
我已经重新安装了 vscode 并尝试使用 vscode 内部人员,并且总是检查以在安装时添加 PATH。

env var PATH 不包含查看位置的提示,我还尝试了“appData/Local/Programs/Microsoft VS Code/bin/code”。我收到一条错误消息:权限被拒绝。

最佳答案

有点晚了,但以防万一有人来这里。
最简单的方法是在/usr/local/bin 中创建符号链接(symbolic link)

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

关于visual-studio-code - wsl 的代码路径是什么,因此 Vscode 安装在用户配置文件中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57746152/

相关文章:

c# - 如何在 Visual Studio Code 中为 C# 函数、类生成代码注释?

python - '导入错误: DLL load failed' when fetching MNIST original via sklearn

用于访问区分大小写路径的 Windows API (Bash-on-Ubuntu-on-Windows)

ruby-on-rails -/sign_in 处的 PG::ConnectionBad 无法连接到服务器:连接但我可以使用 psql 连接

c++ - SDL2 无法创建窗口,因为找不到匹配的 GLX 视觉对象

git - VSCode : How to remove git decorator information from file tabs?

visual-studio-code - Visual Studio Code 中是否有类似 Emacs 中 Tramp Mode 的扩展?

node.js - 在带有 Ubuntu-Bash 和 NodeJS 的 Windows 上使用 Visual Studio Code

android - 是否可以在不安装 Android Studio 的情况下创建和维护 Android 虚拟设备?

c# - 如何检测我的应用程序是否在 Windows 10 上运行