If you’re using Windows 11, Windows Subsystem for Linux 2 (WSL 2) can bring a Linux environment into your workflow. Microsoft documents support for systemd, GPU-accelerated compute, Docker and Dev Container workflows, and Linux GUI applications; check the official WSL documentation for the requirements that apply to your Windows build.
With these improvements, you can now run full Linux distributions such as Ubuntu, Debian, or Fedora on your Windows machine without relying on virtual machines or dual-boot setups. The experience feels almost identical to working on a native Linux system, letting developers, researchers, and students code, test, and deploy Linux applications right inside Windows – no restarts or complicated setup needed.
In this updated guide, you’ll learn how to install WSL 2 on Windows 11 using both the quick one-command method and the manual setup method. You’ll also see how to configure and update your Linux distribution for better performance, enable systemd, optimize your setup using the .wslconfig file, and connect your Windows and Linux environments for a smooth workflow. The quick installation usually takes about 10–15 minutes, while the manual setup with full configuration may take around 20–30 minutes.
Prerequisites
Before beginning the installation, verify your system meets these requirements:
- Windows 11 with the latest updates installed through Windows Update
- Hardware virtualization enabled (Intel VT-x or AMD-V) in your BIOS/UEFI settings
- Administrator access to run PowerShell or Command Prompt with elevated privileges
- Stable internet connection for downloading kernel updates and Linux distributions
- At least 8GB of available disk space (20GB+ recommended for comfortable usage)
Quick verification
To verify your system is ready:
- Press Win + I to open Settings
- Navigate to System > About
- Confirm Windows 11 version is 22000 or higher
- Check that your processor supports virtualization
Verify virtualization is enabled
- Open Task Manager (Ctrl + Shift + Esc)
- Click the Performance tab
- Select CPU
Check if "Virtualization" shows "Enabled"
If virtualization is disabled, restart your computer and enter BIOS/UEFI settings (usually by pressing F2, F12, Del, or Esc during boot) to enable Intel VT-x or AMD-V.
Quick installation method (recommended)
Microsoft introduced a simplified installation command that automates the entire WSL 2 setup process. This is the recommended method for most users running modern Windows 11 builds.
Single command installation
1. Open PowerShell as administrator
- Right-click the Start button
- Select "Windows Terminal (Admin)" or "PowerShell (Admin)"
2. Run the installation command
wsl --install
3. Review what the command does automatically
- Enables the Windows Subsystem for Linux feature
- Enables the Virtual Machine Platform feature
- Downloads and installs the latest Linux kernel
- Sets WSL 2 as the default version
- Installs Ubuntu (the default distribution)
4. Restart and complete the Ubuntu setup
- Create a Linux username (lowercase recommended, no spaces)
- Set a secure password (characters won't display as you type – this is normal)
Installation is complete! You now have a fully functional Ubuntu environment running on WSL 2.
Installing a different distribution
If you prefer a Linux distribution other than Ubuntu:
View available distributions
wsl --list --online
This displays all available Linux distributions, including Ubuntu variants, Debian, Kali Linux, openSUSE, and more.
Install your preferred distribution
wsl --install -d Debian
Replace Debian with any distribution from the list (e.g., Ubuntu-24.04, kali-linux, openSUSE-Leap-15.5).
Verification
After installation, verify everything is working:
wsl --status
You should see output indicating Default Version: 2 and your installed distribution.
wsl --list --verbose
This displays all installed distributions and confirms they're running WSL version 2.
Manual installation method (alternative)
Use this method if the quick installation fails, when troubleshooting issues, or if you require more granular control over the installation process.
Step 1: enable required Windows features
Open PowerShell as Administrator and execute the following commands without rebooting between them:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
This command enables the Windows Subsystem for Linux feature, which provides the foundation for running Linux distributions.
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
This command enables the Virtual Machine Platform, which WSL 2 requires to create its lightweight virtual machine environment.
Now, restart your computer to apply these system-level changes.
Step 2: install the WSL 2 Linux kernel update
After your system restarts, download the latest WSL 2 Linux kernel update package from Microsoft’s WSL 2 Linux kernel update package. Once the download is complete, run the installer file named wsl_update_x64.msi. Follow the installation wizard using the default settings, and then click “Finish” when the installation completes.
In recent Windows 11 builds, the WSL 2 kernel may already be included. If the installer notifies you that it is already present, you can safely skip this step.
Step 3: set WSL 2 as default version
In an Administrator PowerShell window, execute:
wsl --set-default-version 2
This ensures any Linux distribution you install will automatically use WSL 2 rather than the older WSL 1 architecture.
Verify the change:
wsl --status
The output should display "Default Version: 2."
Step 4: install a Linux distribution
You have two options for installing distributions:
Microsoft Store (recommended)
- Open the Microsoft Store application
- Search for your preferred Linux distribution (e.g., "Ubuntu 24.04 LTS")
- Click "Get" or "Install"
- Wait for the download to complete
Command line
wsl --install -d Ubuntu-24.04
Replace Ubuntu-24.04 with any distribution name from wsl –list –online.
Step 5: launch and configure your distribution
Launch your Linux distribution either from the Start menu or by running the command wsl -d Ubuntu-24.04 in PowerShell or Command Prompt. Then wait for the initialization process to complete – the first launch may take 1–2 minutes.
Once initialized, you’ll be prompted to create your Linux user account. Enter a username (use lowercase letters and avoid spaces) and then set a password. The password field will not display any characters as you type; this is completely normal.
Your Linux password is independent of your Windows password, so make sure to store it securely, as it will be required whenever you use sudo commands. After setup completes, you’ll be greeted with a Linux command prompt, indicating your distribution is ready to use.
Updating and configuring your Linux distribution
Update Linux packages
Inside your Linux terminal, run the following commands to update your system:
sudo apt update && sudo apt upgrade -y
This updates the package lists and upgrades all installed packages to their latest versions. The initial update may take several minutes to complete.
For a more thorough update:
sudo apt full-upgrade -y
sudo apt autoremove -y
These commands upgrade all packages (including kernel updates) and remove unnecessary packages.
Update WSL kernel
Return to PowerShell (Administrator) and update the WSL kernel to the latest version:
wsl --update
This fetches the latest WSL kernel releases and components from Microsoft.
Then, cleanly shut down all running WSL instances to apply updates:
wsl --shutdown
Restart your distribution normally after the shutdown completes.
Verify installation
Confirm WSL 2 is properly installed and configured:
wsl --status
Check your installed distributions and their versions:
wsl --list --verbose
The output should show your distribution running on version 2.
If a distribution shows version 1, convert it to WSL 2:
wsl --set-version Ubuntu-24.04 2
Replace Ubuntu-24.04 with your actual distribution name.