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
Check your Windows version

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:

PowerShell (Admin)
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
Restart Required

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:

  1. Open the Start menu and search for "Ubuntu"
  2. Click to launch it. The first launch takes a few minutes to complete setup.
  3. When prompted, enter a username for your Linux user (all lowercase, no spaces - e.g., "john" or "dev")
  4. Enter a password. Note: you won't see characters as you type - this is normal!
Remember your password

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:

Ubuntu
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:

Ubuntu
sudo apt update && sudo apt upgrade -y

Enter your password when prompted. The update process may take a few minutes.