Install WSL
Set up Windows Subsystem for Linux with Ubuntu
WSL (Windows Subsystem for Linux) lets you run a full Linux environment directly on Windows, without the overhead of a virtual machine. It's the best way to use Linux on Windows.
Requirements
- Windows 10 version 2004 or higher (Build 19041+)
- Windows 11 (any version)
- Administrator access to your computer
Press Win+R, type winver, and press Enter.
Your OS Build number should be 19041 or higher.
Install WSL and Ubuntu
Open PowerShell as Administrator (right-click the Start menu and select "Terminal (Admin)" or "PowerShell (Admin)") and run:
wsl --install -d Ubuntu-24.04
This single command:
- Enables the WSL feature
- Downloads and installs the Linux kernel
- Downloads and installs Ubuntu 24.04 LTS
- Sets WSL 2 as the default version
After the installation completes, you'll need to restart your computer. Make sure to save any open work before running the command.
First Launch
After restarting:
- Open the Start menu and search for "Ubuntu"
- Click to launch it. The first launch takes a few minutes to complete setup.
- When prompted, enter a username for your Linux user (all lowercase, no spaces - e.g., "john" or "dev")
- Enter a password. Note: you won't see characters as you type - this is normal!
You'll need this password when installing software with sudo.
It can be different from your Windows password.
Verify Installation
Once you see the Ubuntu prompt, verify your installation:
cat /etc/os-release
You should see output mentioning "Ubuntu 24.04" or similar.
Update Ubuntu
It's good practice to update Ubuntu immediately after installation:
sudo apt update && sudo apt upgrade -y
Enter your password when prompted. The update process may take a few minutes.