Enabling WSL on Windows 11 is done most simply by running wsl --install in an administrator PowerShell, then restarting your PC.
Windows Subsystem for Linux (WSL) lets you run a full Linux environment directly inside Windows without a virtual machine. The tricky part is knowing which method to use and what to do when something goes wrong. This guide walks you through the official Microsoft‑recommended path, then covers the manual route for offline setups and common pitfalls to avoid.
What Is WSL and Why Enable It?
WSL gives you a real Linux kernel, command‑line tools, and the ability to install distributions like Ubuntu or Debian right inside Windows 11. Developers use it to run bash scripts, use package managers, and test code without dual‑booting. The feature is built into Windows, but it must be turned on explicitly.
The single fastest way to enable everything—including the optional VirtualMachinePlatform component and a default distro—is the wsl --install command in an elevated PowerShell. Microsoft now treats this as the primary installation method for supported systems.
What You Need Before You Start
Before running any commands, verify your system meets the requirements. The table below lists every prerequisite and how to check it.
| Requirement | Details | How to Verify |
|---|---|---|
| Windows 11 (any edition) | Home, Pro, Enterprise, or Education all work | Open Settings > System > About – look for “Edition” |
| Administrator access | You must be able to run PowerShell as admin | Right‑click Start → Windows PowerShell (Admin) |
| Hardware virtualization enabled | Required for WSL 2’s virtual machine platform | In Task Manager → Performance tab → Virtualization: “Enabled” |
| Virtual Machine Platform feature | Optional feature needed for WSL 2 (auto‑enabled by wsl --install) |
Check in Turn Windows features on or off list |
| Windows Subsystem for Linux feature | The core component | Same location – must be checked after installation |
| Stable internet connection | The command downloads components and a default distro | Test with any website |
| Restart after installation | A reboot finalizes the feature enablement | You’ll be prompted or can restart manually |
How Do I Enable WSL with a Single Command?
The simplest and most reliable route is the one‑line command Microsoft provides. Follow these steps exactly.
- Open PowerShell as Administrator – right‑click the Start button and select Windows PowerShell (Admin) or Terminal (Admin). Confirm the UAC prompt.
- Run the install command – type
wsl --installand press Enter. The system downloads WSL, enables the required features, and installs a default Linux distribution (usually Ubuntu). - Restart your computer when prompted. If no prompt appears, reboot anyway to finalize the changes. After restart, the distro will finish its setup.
That’s it. After restart, you’ll see a Linux terminal window where you can create a username and password. Your WSL environment is ready to use.
Can I Enable WSL Without the Command Line?
Yes – the manual or offline path exists for systems without internet or for users who prefer the traditional Windows Features dialog. This method is also necessary if you need a specific distro version that isn’t the default.
- Open Windows Features – search for “Turn Windows features on or off” and open it.
- Enable two components – check Windows Subsystem for Linux and Virtual Machine Platform. Click OK.
- Restart when prompted.
- Download and install a distro – either from the Microsoft Store or by using a
.wslfile for offline install. If using the latter, first download the WSL MSI package from Microsoft’s GitHub releases and install it. - Launch the distro – after installation, start it from the Start menu. It will initialize and prompt for a username/password.
One common mistake: enabling only one of the two features. Both must be checked for WSL 2 to work properly. If you skip VirtualMachinePlatform, WSL will fall back to WSL 1, which lacks the full Linux kernel.
Enabling WSL in Windows 11: The Official Step Order
Microsoft’s documentation is clear about the hierarchy of steps. The most stable approach is the command‑line path because it automatically enables the correct optional features and installs the latest WSL kernel. The manual path works but requires you to enable components in the correct order: features first, then reboot, then distro installation. Both methods are supported, but the command is less error‑prone.
If you ever see an error like “The virtual machine could not be started,” the likely cause is disabled hardware virtualization. Enter your BIOS/UEFI (often by pressing F2 or Del during boot) and look for Intel VT‑x, AMD‑V, or SVM Mode – enable it, save, and boot back into Windows.
| Issue | Common Cause | Fix |
|---|---|---|
| ‘wsl’ is not recognized | WSL not installed or PATH issue | Run wsl --install in an admin PowerShell, or manually enable features via Windows Features |
| Installation hangs | Slow internet or pending Windows update | Check for updates, restart, try again; or use the offline method via Windows Features |
| Distro fails to launch | Virtualization disabled in BIOS | Enter BIOS and enable virtualization (Intel VT‑x / AMD‑V) |
| WSL 1 instead of WSL 2 | VirtualMachinePlatform not enabled | Run wsl --set-default-version 2 after enabling the feature |
| “Access denied” on command | PowerShell not run as administrator | Close and reopen PowerShell using “Run as administrator” |
WSL Setup Checklist: What to Do After Enabling
Once WSL is enabled, your environment isn’t complete until you’ve set up your distro and verified it works. Here’s a final sequence to run through:
- Open your installed distro from the Start menu.
- Create a Linux username and password when prompted – this is separate from your Windows account.
- Update the package list:
sudo apt update && sudo apt upgrade(for Ubuntu/Debian). - Confirm WSL version:
wsl -l -vin PowerShell – ensure it shows version 2 for your distro. - If you need a different distro, install it from the Microsoft Store or via
wsl --install -d <name>.
After these steps, you can access Linux tools from inside Windows, run bash scripts, and integrate with Windows apps.
References & Sources
- Microsoft. “How to install Linux on Windows with WSL.” Official installation guide covering both single-command and manual paths for Windows 11.
