簡體   English   中英

VS Code 未在 WSL -2 Ubuntu 18.04 服務器中打開 - 未找到給出命令“代碼”

[英]VS Code is not open in WSL -2 Ubuntu 18.04 server - giving command 'code' not found

當我輸入 code 時,我在 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>

此問題是由於窗口更新和斷開連接引起的。 我已經完成了這些步驟

  1. 轉到 ubuntu 主目錄並刪除 . vscode 服務器在此處輸入圖像描述

  2. 然后轉到設置->應用程序->搜索ubuntu->轉到高級選項->重置->修復

在此處輸入圖像描述

  1. 運行並輸入service.msc

在此處輸入圖像描述

  1. 轉到 LxssManager 並右鍵單擊並重新啟動在此處輸入圖像描述

  2. 現在轉到 ubuntu 終端並輸入code . 它將下載vs代碼並且可以正常工作

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM