# WSL:在 Win10 安裝適用 Linux 的子系統 WSL(Windows Subsystem for Linux)這裡採用手動安裝的方式。 ### 〔Step 1〕 啟用「Windows 子系統 Linux 版」功能,以系統管理員身分開啟 PowerShell 並執行: ``` dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart ```  ### 〔Step 2〕 要啟用「虛擬機器平台」功能,以系統管理員身分開啟 PowerShell 執行以下: ``` dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart ```  ### 〔Step 3〕 cmd 裡輸入 `systeminfo` 查看系統類型是 x64 還是 ARM64:  * 若為 X64 系統:版本 1903 或更高版本,下載這個: https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi * 若為 ARM64 系統:版本 2004 或更高版本,下載這個: https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_arm64.msi 載好後,雙擊安裝剛載好的 .msi 檔案,一直按 next 大概幾秒完成。  ### 〔Step 4〕 在工具列上的搜尋框搜尋 Microsoft Store 打開後,選一個想安裝的 Linux 版本: [Ubuntu 18.04 LTS](https://www.microsoft.com/store/apps/9N9TNGVNDL3Q) [Ubuntu 20.04 LTS](https://www.microsoft.com/store/apps/9n6svws3rx71) [Kali Linux](https://www.microsoft.com/store/apps/9PKR34TNCV07)   ### 〔Step 5〕 啟動後會進入 ubuntu 的終端機,可以設定自己的 username 跟 password。 這步驟結束就算正式完成 WSL 中 Ubuntu 系統的安裝了。  在 PowerShell 中輸入 `wsl --list --verbose` 可以檢視當前發行版本是 WSL 1 還是 WSL 2  ### 〔Step 6〕 可以接著在 Microsoft Store 搜尋並安裝微軟終端機(可啟用多個索引標籤,在多個 Linux 命令列、Windows 命令提示字元、PowerShell 等之間快速切換): 下載地址:[Microsoft Store - Windows Terminal](https://www.microsoft.com/zh-tw/p/windows-terminal/9n0dx20hk701?rtc=1&activetab=pivot:overviewtab)  ### 〔Reference〕 https://docs.microsoft.com/zh-tw/windows/wsl/install-win10 https://docs.microsoft.com/zh-tw/windows/terminal/ --- : : 20210702 : : 與松 withhhsong : : ###### tags: `WSL` `Linux` `Ubuntu` `withhhsong`
×
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