wsl `code .` Command 'code' not found...

原因是 wsl 没有配置与 vscode 相关的环境变量

export PATH="$PATH:/mnt/你的 vscode 在 windows 上的地址" # 添加 code 到环境变量

需要写在 ~/.bashrc 里才能永久有效(针对当前用户)
刷新配置 source ~/.bashrc

posted on 2022-07-11 15:14  Slime04  阅读(1349)  评论(1)    收藏  举报