# WSL (Windows Subsystem for Linux)安裝及設定SOP ###### tags: `Docker` `WSL` ## SOP ### 安裝WSL 1. 控制台 => 程式集 => 程式和功能 => 開啟或關閉Windows功能  2. 適用於Linux的Windows子系統 => 打勾  3. 重開機 4. Microsoft Store => 搜尋Ubuntu => 下載及安裝Ubuntu20.04 (此次以Ubuntu20.04為例) 5. 開啟Ubuntu20.04程式,並且設定帳號密碼後關閉 6. 重開機 ### 將Ubuntu檔案移出系統碟以減輕系統碟負擔(非必要) 7. 以管理者權限打開命令提示字元後安裝Chocolatey ```javascript= @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin" ``` 安裝時會有選項,選 [A] 8. 重開機 9. 以管理者權限打開Windows_Powershell後安裝LxRunOffline ```javascript= choco install lxrunoffline ``` 10. 重開機 11. 以管理者權限打開Windows_Powershell後將Ubuntu20.04移動到D槽以減輕系統碟負擔,此次以Ubuntu20.04要移到D:\Ubuntu\為例 ```javascript= lxrunoffline move -n Ubuntu-20.04 -d D:\Ubuntu\ ``` 請忽略執行中出現的Warning訊息並等待其執行完 ## 參考資料 1. https://medium.com/@misscoming/%E5%9C%A8-windows-10-%E4%B8%8A%E8%B7%91-ubuntu-18-04-92f80b2d725b 2. https://marcus116.blogspot.com/2019/02/chocolatey-windows-chocolatey.html 3. https://dev.to/kapilgorve/move-install-wsl-distro-from-c-drive-to-another-drive-19g9
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up