install Ubuntu on WSL
Here’s how you can install Ubuntu on WSL (Windows Subsystem for Linux) in Windows 11:
Open PowerShell as Administrator and run:
wsl --install
If you want to install Ubuntu explicitly:
wsl --install -d Ubuntu
-d specifies the distribution.Ubuntu-20.04 or Ubuntu-22.04.wsl --install -d Ubuntu-22.04
wsl in PowerShell.Once inside Ubuntu, run:
sudo apt update && sudo apt upgrade -y
This ensures your packages are up to date.
👉 Tip: You can check which distros are available with:
wsl --list --online
Would you like me to show you a comparison table of Ubuntu versions (20.04 vs 22.04) so you can decide which one fits best for your workflow?
| File5 | File | Last Modified |
|---|---|---|
| 在WSL 中安裝 Ubuntu | 在WSL 中安裝 Ubuntu | 2:25 PM - January 12, 2026 |
| Windows 上透過 WSL 進入 Ubuntu shell | Windows 上透過 WSL 進入 Ubuntu shell | 2:25 PM - January 12, 2026 |
| Restart Docker | Restart Docker | 2:25 PM - January 12, 2026 |
| Force restart WSL | Force restart WSL | 2:25 PM - January 12, 2026 |
| set WSL’s default distribution | set WSL’s default distribution | 3:14 PM - December 15, 2025 |