How to Install Ubuntu on Windows Using WSL 1. Enable WSL and Virtual Machine Platform Open PowerShell as Administrator: ...
How to Install Ubuntu on Windows Using WSL
1. Enable WSL and Virtual Machine Platform
Open PowerShell as Administrator: Press Windows + X and select Windows PowerShell (Admin). Run:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Restart your computer.
2. Install WSL 2 (Optional but recommended)
After restart, open PowerShell as Administrator again and run:
wsl --set-default-version 2
3. Install Ubuntu from Microsoft Store
Open Microsoft Store, search for Ubuntu (e.g., "Ubuntu 20.04 LTS" or "Ubuntu 22.04 LTS"), then click Get or Install.
4. Set up Ubuntu
Launch Ubuntu from the Start menu. It will take a few minutes to set up. Create a username and password when prompted.
5. (Optional) Upgrade to WSL 2 if not set
Run:
wsl --list --verbose
Find your Ubuntu distribution, and if it shows version 1, upgrade by running:
wsl --set-version Ubuntu-20.04 2
Replace Ubuntu-20.04 with your installed distribution name.