通过Windows10上的VS Code打开远端Ubuntu上的项目操作步骤
? ? ? Ubuntu版本要求是16.04及以上版本。這里以16.04為例。
? ? ? 在Ubuntu上安裝OpenSSH server,執行:$ sudo apt-get install openssh-server
? ? ? 在Windows 10 1803+上安裝Windows OpenSSH Client(注:Windows早期版本則需要安裝Git for Windows):
? ? ? (1).依次點擊打開:設置 --> 應用和功能 --> 可選功能
? ? ? (2).在”已安裝功能”中查看,OpenSSH客戶端是否已安裝;若未安裝,則點擊”添加功能”,查找”OpenSSH客戶端”,再點擊安裝。
? ? ? 在Windows上安裝Visual Studio Code Remote Development Extension Pack:從Remote Development - Visual Studio Marketplace 點擊安裝。
? ? ? Windows上VS Code打開Ubuntu上的項目:
? ? ? (1).驗證是否能夠訪問到Ubuntu:打開VS Code中的Terminal,輸入ssh user@ip,輸入密碼,看是否能夠正常訪問;
? ? ? (2).在VS Code中按F1,輸入:Remote-SSH:Connect to Host …
? ? ? (3).若沒有顯示Ubuntu上的ip,則點擊”Add New SSH Host”,輸入” ssh user@ip”及密碼,選擇remote host為Linux;
? ? ? (4).稍等片刻后,VS Code將連接到SSH服務器,如打開Ubuntu上的NN_Test,需要輸入密碼,并點擊”Enter”,結果如下:
? ? ? 更詳細信息可參考:Developing on Remote Machines using SSH and Visual Studio Code
總結
以上是生活随笔為你收集整理的通过Windows10上的VS Code打开远端Ubuntu上的项目操作步骤的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 深度神经网络中的Batch Normal
- 下一篇: Python3中None用法