How to Set Up WSL2 with Ubuntu on Windows 11 in 2026
A complete step-by-step guide to installing WSL2 and Ubuntu on Windows 11 so you can run a full Linux environment right inside your PC.
What Is WSL2 and Why Should You Use It?
Windows Subsystem for Linux 2 (WSL2) lets you run a genuine Linux kernel directly on Windows 11, without a virtual machine or dual-boot setup. In 2026, WSL2 is the go-to tool for developers who need Linux tooling — Docker, bash scripts, native compilers — while staying on Windows.
This guide walks you through installing WSL2, choosing Ubuntu as your distribution, and getting your environment production-ready.
Prerequisites
- Windows 11 (any edition — Home works fine)
- Windows Update fully applied
- Virtualization enabled in BIOS (most modern PCs have this on by default)
Step 1 — Enable WSL2 with One Command
Open PowerShell as Administrator and run:
wsl --install
This single command enables the WSL feature, installs the WSL2 kernel, and downloads Ubuntu — the default distribution. Your machine will ask you to reboot.
Step 2 — Set Up Your Ubuntu User Account
After rebooting, Ubuntu will launch automatically and prompt you to create a Linux username and password. These credentials are separate from your Windows account.
Enter new UNIX username: skyler
New password:
Retype new password:
passwd: password updated successfully
Step 3 — Update Ubuntu Packages
Once you are at the Ubuntu shell, update the package index and upgrade installed packages:
sudo apt update && sudo apt upgrade -y
This brings your Ubuntu installation up to date and ensures you have the latest security patches.
Step 4 — Verify WSL2 Is Running
Back in PowerShell (not the Ubuntu shell), confirm WSL2 is the active version:
wsl --list --verbose
You should see output like:
NAME STATE VERSION
* Ubuntu Running 2
The VERSION 2 confirms you are using the WSL2 kernel — not the older WSL1.
Step 5 — Install Essential Developer Tools
Inside your Ubuntu shell, install the build tools you will need for most development workflows:
sudo apt install -y build-essential curl git wget unzip
Step 6 — Access Windows Files from Linux (and Vice Versa)
Your Windows drives are automatically mounted under /mnt/. To reach your Windows Desktop:
cd /mnt/c/Users/YourName/Desktop
From Windows Explorer, you can access your Linux home directory by navigating to \wsl$Ubuntuhomeyourusername in the address bar.
Step 7 — (Optional) Install Windows Terminal
For the best WSL experience, install Windows Terminal from the Microsoft Store. It supports tabs, profiles per distro, GPU-accelerated text rendering, and full Unicode support. Once installed, it automatically detects your Ubuntu distribution and adds it as a profile.
Common Fixes
Virtualization Not Enabled
If WSL install fails with a virtualization error, restart your PC, enter BIOS/UEFI (usually F2 or Del during POST), and enable Intel VT-x or AMD-V under CPU settings.
Switching an Existing Distro to WSL2
If you installed a distro under WSL1 previously, convert it:
wsl --set-version Ubuntu 2
Next Steps
With WSL2 running you can now install Node.js via nvm, set up Python with pyenv, run Docker Desktop with WSL2 backend, and use VS Code's Remote - WSL extension for a seamless Linux-inside-Windows coding experience.