How to Install Ubuntu on WSL in Windows (Step-by-Step Guide)
Learn how to install and run Ubuntu on Windows using Windows Subsystem for Linux (WSL).
Prerequisites
- Windows 10 (version 2004+) or Windows 11
- WSL enabled on your system
Step-by-Step Installation
- Open the Start Menu and search for Microsoft Store.
- In the Store, search for Ubuntu.
- Select your preferred version (e.g., Ubuntu 20.04 or 22.04).
- Click on Get and wait for the download and installation to complete.
- Once installed, open Ubuntu from the Start Menu.
- Complete the initial setup by creating a username and password.
Useful WSL Commands
-
List all installed WSL distributions:
wsl --list --verbose -
Set default Ubuntu version:
wsl -s Ubuntu-20.04 -
Launch a specific distribution:
wsl -d Ubuntu-20.04
Additional Tips
- Use
wsl --installfor a one-command installation (Windows 11 recommended). - Keep your Ubuntu updated using:
sudo apt update && sudo apt upgrade - You can install multiple Ubuntu versions and switch between them easily.