在WSL 中安裝 Ubuntu
在 Windows 上的 WSL(Windows Subsystem for Linux)中安裝 Ubuntu 非常簡單,以下是一份完整的操作指南:
wsl --install -d Ubuntu
這會直接安裝最新版本的 Ubuntu。如果你想安裝特定版本(例如 Ubuntu 20.04 或 22.04),可以輸入:
wsl --install -d Ubuntu-20.04
或
wsl --install -d Ubuntu-22.04
第一次啟動 Ubuntu 時,系統會要求你:
sudo apt update
sudo apt install curl
wsl --list --verbose
👉 建議你先用 wsl --list --verbose 看看目前有哪些發行版已安裝。如果還沒有 Ubuntu,就用 wsl --install -d Ubuntu 或 Microsoft Store 安裝。
要不要我幫你整理一份 WSL + Ubuntu 常用安裝軟體速查表(例如 git、curl、vim、docker),讓你安裝完 Ubuntu 就能馬上開始用?
| File1 | File | Last Modified |
|---|---|---|
| Windows 上透過 WSL 進入 Ubuntu shell | Windows 上透過 WSL 進入 Ubuntu shell | 1:26 AM - December 07, 2025 |