To install WSL (Windows Subsystem for Linux) on Windows 11, open PowerShell or Command Prompt as Administrator and run wsl --install, then restart your PC. This single command installs the WSL feature, the virtual machine platform, and a default Linux distribution (usually Ubuntu) automatically. After restarting, Ubuntu will launch and ask you to create a username and password. That's the shortest working path — the rest of this guide covers the full process, customization, common mistakes, and troubleshooting.
What You'll Need
- A Windows 11 PC (any edition, Home or Pro) with at least 64 GB of storage and 4 GB of RAM — though more is better for running Linux GUI apps.
- Administrator access to your PC (you'll need to approve a UAC prompt).
- An internet connection — the install downloads the Linux distribution from Microsoft's servers.
- Virtualization enabled in your BIOS/UEFI. Most modern PCs have it on by default, but if you get an error about virtualization, you'll need to enable it in firmware settings.
Step-by-Step
- Open PowerShell or Command Prompt as Administrator. Click the Start button, type
powershell(orcmd), right-click the top result, and choose "Run as administrator." Accept the User Account Control prompt. - Run the install command. Type
wsl --installand press Enter. This command does three things: enables the Windows Subsystem for Linux feature, enables the Virtual Machine Platform feature, and installs the default Linux distribution (Ubuntu). The process may take several minutes and will show progress in the terminal. - Restart your PC. When the command finishes, you'll see a message like "The requested operation is successful. Changes will not be effective until the system is rebooted." Restart now — WSL won't work until you do.
- Wait for the distribution to finish installing. After restart, the Ubuntu window (or whatever distro you installed) will open automatically, showing "Installing, this may take a few minutes..." Wait until it prompts you to create a UNIX username.
- Create a username and password. Enter a username (lowercase letters, no spaces) and press Enter. Then enter a password — note that the characters won't show as you type, which is normal. You'll be asked to confirm the password. This is your Linux account, separate from your Windows account.
- Update your Linux packages. Once you're at the Linux command prompt, run
sudo apt updateand thensudo apt upgradeto get the latest software. Enter your Linux password when prompted. This keeps your system secure and up-to-date. - Verify the installation. In Windows, open PowerShell and type
wsl --statusto see the WSL version and default distribution. Typewsl --list --verboseto see installed distros and their state.
Common Mistakes
- Running the install command without admin rights. If you open PowerShell normally, you'll get an error about access denied. Always right-click and choose "Run as administrator."
- Not restarting after the first install. The command may seem done, but WSL won't function until you reboot. If you skip the restart, you'll see errors like "WSL is not installed" or "The Windows Subsystem for Linux is not enabled."
- Forgetting your Linux password. There's no password reset from Windows — you'd need to run
wsl --unregister(which deletes all your Linux files) and start over. Write it down or use a password manager. - Installing an old Linux distribution manually. Some old guides tell you to go to "Turn Windows features on or off" and check "Windows Subsystem for Linux" — that only enables the old WSL1 feature, not the full WSL2 with the modern kernel. Use the
wsl --installcommand instead. - Assuming WSL is a full Linux desktop. By default, you get a command-line interface. If you want a graphical desktop, you need to install a Linux GUI app (like a desktop environment) separately — WSLg provides GUI support, but it's not a full desktop by default.
Tips
- Choose a different distribution. If you don't want Ubuntu, run
wsl --install -dwhereis one of the available names (e.g.,Debian,kali-linux,opensuse). To see the full list, runwsl --list --online. - Access your Windows files from Linux. Your Windows drives are mounted under
/mnt/c/for C:,/mnt/d/for D:, etc. You can copy files between the systems easily. For example,cd /mnt/c/Users/YourName/Documents. - Run Linux commands from Windows. You can invoke Linux commands from PowerShell or Command Prompt by prefixing with
wsl— e.g.,wsl ls -lalists files in the default directory. This is handy for scripting. - Set your default distribution. If you install multiple distros, run
wsl --set-defaultto choose which one opens when you typewsl. - Use the Windows Terminal app. Windows Terminal (available in the Microsoft Store) gives you tabs, split panes, and better color support for WSL. It's free and recommended.
- Keep WSL updated. Run
wsl --updatein an admin PowerShell to get the latest WSL kernel and features. Also update your Linux packages regularly withsudo apt update && sudo apt upgrade.
Troubleshooting
If something goes wrong, work through these checks in order — they go from simplest to most drastic.
- Check if virtualization is enabled. If you get an error like "Please enable the Virtual Machine Platform" or "WSL2 requires an update to its kernel component," virtualization might be off in BIOS. Restart your PC, press the key to enter BIOS (often Del, F2, or F10), look for a setting named "Intel VT-x," "AMD-V," "SVM Mode," or "Virtualization," and enable it. Save and exit. If you're not comfortable changing BIOS settings, consult your PC manufacturer's support page.
- Make sure WSL is fully enabled. In an admin PowerShell, run
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestartand thendism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart. Restart, then runwsl --update. - Check for driver or update issues. Run
wsl --updatein an admin terminal. If that fails, go to Windows Update and install all pending updates, including optional updates (Settings > Windows Update > Advanced options > Optional updates). - If the distribution fails to launch or freezes. Close the window, open PowerShell, and run
wsl --shutdownto stop all WSL processes. Then try launching the distro again. If it still freezes, restart your PC. - If you see "WSL is not installed" after restart. Re-run
wsl --installin an admin terminal. It should say "The requested operation is successful." Then restart again. - If all else fails, unregister and reinstall the distribution. This deletes all files inside that Linux environment — you'll lose any work you did there. Run
wsl --unregister(e.g.,wsl --unregister Ubuntu), then reinstall withwsl --install -d. This is a last resort, but it fixes most corrupted installations.
Frequently Asked Questions
Do I need to enable Hyper-V to use WSL2?
No. WSL2 uses the Virtual Machine Platform, which is a separate feature from Hyper-V. The wsl --install command enables it automatically. You don't need to manually enable Hyper-V, and in fact, Hyper-V isn't available on Windows 11 Home.
Can I install WSL on Windows 11 Home?
Yes. WSL2 works on Windows 11 Home, Pro, Enterprise, and Education. The install command works the same on all editions.
What's the difference between WSL1 and WSL2?
WSL2 uses a real Linux kernel in a lightweight virtual machine, offering full system call compatibility and better performance for Docker and other tools. WSL1 is a translation layer that's faster for file I/O on Windows drives but less compatible. Windows 11 defaults to WSL2, and you can check your version with wsl --status.
Can I access my Windows files from WSL?
Yes. Your Windows drives are mounted under /mnt/c, /mnt/d, etc. You can read and write those files from Linux, but be careful — modifying Windows system files can break things.
Can I run graphical Linux applications?
Yes, with WSLg (included in recent WSL versions) you can run GUI apps like Firefox or Gedit directly. Just install the app in Linux (e.g., sudo apt install firefox) and launch it from the terminal. The window will appear on your Windows desktop.
How do I uninstall WSL completely?
Run wsl --unregister for each distribution to delete the Linux files, then in admin PowerShell run wsl --shutdown. To remove the WSL feature itself, go to Settings > Apps > Optional features, find "Windows Subsystem for Linux" and "Virtual Machine Platform," and uninstall them. Restart your PC.