Home / How-to / How to Run Linux on Windows 11 With WSL2: Step-by-Step 2026

How to Run Linux on Windows 11 With WSL2: Step-by-Step 2026

How to Run Linux on Windows 11 With WSL2: Step-by-Step 2026 — editorial featured image showing the topic context, key signals, and reader intent
Table of Contents
  1. What Is WSL2 and Why Use It?
  2. Step-by-Step: Enable WSL2 on Windows 11
  3. Install Ubuntu and Set Up Your Linux Environment
  4. Common Questions — How to Install Linux on Windows 11 WSL2
  5. Conclusion

Key takeaways

  • Follow the main steps in How to Run Linux on Windows 11 With WSL2: Step-by-Step 2026 in order; skipping prerequisites is the most common source of errors.
  • Prioritize official packages, backups, and rollback paths when the guide touches servers, security, or production tools.
  • Use the Next Read links at the end to continue with related setup, performance, or protection tasks.

Want to use Linux tools without giving up Windows? You’re not alone. Millions of developers, sysadmins, and power users now install Linux on Windows 11 using WSL2 — and it takes less than five minutes with a single command. Gone are the days of dual-booting or wrestling with virtual machines that drain your RAM. WSL2 (Windows Subsystem for Linux 2) gives you a genuine Linux kernel running directly alongside Windows, with near-native performance and zero hardware overhead. Whether you need Bash scripting, Python environments, Docker containers, or simply want to try Ubuntu for the first time, this step-by-step guide covers everything: prerequisites, installation, environment setup, GUI apps, and the most common beginner questions. By the end, you’ll have a fully working Linux shell on Windows 11 ready to use today.

Sleek gaming desk setup featuring RGB lighting, large monitor, and gaming PC with glowing fans. — Photo by Atahan Demir on Pexels

What Is WSL2 and Why Use It?

WSL2 stands for Windows Subsystem for Linux, version 2. Unlike its predecessor WSL1, which translated Linux system calls into Windows equivalents, WSL2 ships with a real Linux kernel (Linux 5.15+) running inside a lightweight Hyper-V virtual machine. That architectural shift is the reason WSL2 delivers near-native speed — file I/O in the Linux filesystem is up to 20× faster than WSL1, and compute-heavy workloads like compiling code or running servers perform at levels essentially identical to bare-metal Linux.

Here is a quick comparison of the two versions:

FeatureWSL1WSL2
Linux kernelEmulated (translation layer)Real kernel (Linux 5.15+)
PerformanceModerateNear-native
Docker supportLimitedFull (Docker Desktop uses it)
GUI apps (WSLg)NoYes (Windows 11 built-in)
System call compatibilityPartialFull

WSL2 also integrates tightly with Windows 11 through WSLg, which lets you open Linux GUI applications — like GIMP or a GTK app — directly on your Windows desktop with no X server setup. For developers, it pairs seamlessly with VS Code, Docker Desktop, and the Windows Terminal.

Step-by-Step: Enable WSL2 on Windows 11

A modern gaming setup featuring RGB lighting, dual monitors, and a custom PC with colorful components. — Photo by Atahan Demir on Pexels

Since 2022, Microsoft consolidated the entire WSL2 setup into a single command. You no longer need to manually enable “Windows Features” or set the WSL version separately. Follow these steps exactly and you will have WSL2 running in under ten minutes. Find more practical guides like this in our How-to category.

Step 1 — Check prerequisites

  • Windows 11 (any edition — Home, Pro, or Enterprise)
  • Virtualization enabled in BIOS/UEFI (usually on by default on modern machines)
  • An internet connection for the initial download

Step 2 — Open PowerShell as Administrator

Press Win + S, type PowerShell, right-click the result, and choose Run as administrator. Click Yes on the UAC prompt.

Step 3 — Run the WSL install command

wsl --install

This single command does everything: enables the WSL and Virtual Machine Platform Windows features, downloads the latest Linux kernel, sets WSL2 as the default version, and installs Ubuntu automatically.

Step 4 — Restart your PC

After the command completes, restart Windows when prompted. The restart finalizes the kernel installation. After rebooting, Ubuntu will continue its setup automatically in a new terminal window.

Step 5 — Install a different distro (optional)

WSL2 supports Ubuntu, Debian, Fedora Remix, Kali Linux, openSUSE, and Alpine Linux. To see available distros and install a specific one, run:

wsl --list --online
wsl --install -d Debian

Install Ubuntu and Set Up Your Linux Environment

After the reboot, Ubuntu launches automatically and asks you to create a Linux user account. This account is independent of your Windows login — choose any username and a strong password. Once done, follow these steps to get a clean, fully updated environment. Microsoft’s official documentation at learn.microsoft.com/en-us/windows/wsl/install is an excellent reference if you run into issues.

Step 1 — Update all packages immediately

sudo apt update && sudo apt upgrade -y

Step 2 — Install common developer tools

sudo apt install build-essential curl git wget unzip -y

Step 3 — Access your Windows files from Linux

Your Windows drives are automatically mounted under /mnt/. Your C: drive is at /mnt/c/, so your Windows user folder is accessible with:

ls /mnt/c/Users/

For best performance, keep project files inside the Linux filesystem (~/projects/) rather than on /mnt/c/, since cross-filesystem I/O is slower.

Step 4 — Connect VS Code (recommended)

Install Visual Studio Code on Windows, then install the WSL extension from the Extensions panel. Typing code . inside your WSL2 terminal opens the current Linux directory directly in VS Code on Windows — full IntelliSense, debugging, and terminal, all running against the Linux environment.

Step 5 — Run Linux GUI apps with WSLg (optional)

Windows 11 includes WSLg built-in, so any Linux GUI application opens on your Windows desktop automatically. No configuration needed. Try it:

sudo apt install gedit -y && gedit

Common Questions — How to Install Linux on Windows 11 WSL2

Q: Do I need to pay for WSL2 or buy a Windows 11 Pro license?

A: No. WSL2 is completely free and works on all editions of Windows 11, including Home. There is no Pro or Enterprise license requirement. Simply run wsl --install in an elevated PowerShell and the feature installs at no cost.

Q: Will WSL2 slow down my Windows PC?

A: Not noticeably. WSL2 runs inside a lightweight Hyper-V virtual machine that starts and stops on demand. When you close your Linux terminal, the VM suspends and releases memory. On a machine with 8 GB RAM or more, most users report zero perceptible impact on Windows performance during normal multitasking.

Q: Can I run Docker inside WSL2 on Windows 11?

A: Yes, and this is one of the most popular WSL2 use cases. Docker Desktop for Windows uses WSL2 as its backend by default. You can also install Docker Engine directly inside Ubuntu without Docker Desktop for a leaner setup. Either way, containers run at near-native Linux speed.

Q: How do I uninstall WSL2 or remove a Linux distro?

A: To remove a specific distro, open PowerShell and run wsl --unregister Ubuntu — this deletes the distro and all its files permanently. To remove WSL entirely, go to Settings → Apps → Optional Features → More Windows features, uncheck “Windows Subsystem for Linux” and “Virtual Machine Platform”, then restart.

Conclusion

Running Linux on Windows 11 with WSL2 is now genuinely straightforward. Here are the three things to remember:

  • One command does it all. wsl --install in elevated PowerShell installs WSL2, downloads the Linux kernel, and sets up Ubuntu in a single step — no manual feature toggling required since 2022.
  • Performance is near-native. WSL2 runs a real Linux 5.15+ kernel with I/O speeds up to 20× faster than WSL1, making it viable for serious development work, Docker, and even GUI applications via WSLg.
  • The ecosystem is ready. From VS Code integration to Docker Desktop, Python and Node.js environments to Kali Linux security tools, WSL2 on Windows 11 supports the full spectrum of Linux use cases without requiring a dedicated Linux machine.

If you found this guide useful, explore more tutorials on servers, containers, and cloud infrastructure in our Dev & IT Ops category — new articles publish every week.

About the author: TouchEVA is a tech journalist covering AI, software, and cybersecurity for Hubkub.com — independent tech media since 2025.

Last Updated: April 13, 2026

TouchEVA

TouchEVA

Founder and lead writer at Hubkub. Covers software, AI tools, cybersecurity, and practical Windows/Linux workflows.

Tagged: