How to Install Windows Subsystem for Linux on Windows 11
In this article
Installing the Windows Subsystem for Linux (WSL) on Windows 11 enables you to run a full Linux environment directly on your PC without dual-booting or using a virtual machine. This setup provides access to native Linux command-line tools, utilities, and application development environments alongside your standard Windows applications. The process is streamlined in Windows 11, often requiring just a single command to complete the installation.
What You'll Need
- A Windows 11 PC with administrative privileges
- An active internet connection for downloading updates and packages
- Windows 11 version 21H2 or higher (build 22000 or later)
Step-by-Step
- Open PowerShell as Administrator: Right-click the Start button and select "Terminal (Admin)" or "Windows PowerShell (Admin)." If prompted by User Account Control, click Yes to allow administrative access.
- Run the Installation Command: Type the following command exactly as shown and press Enter:
wsl --install. This command performs several actions automatically: it enables the necessary Virtual Machine Platform component, installs the Linux kernel update package, downloads and sets up the default Ubuntu distribution, and configures WSL as the default option if not already set. - Restart Your Computer: After the command finishes executing, you must restart your system to apply the changes. Save any open work and reboot your PC immediately.
- Complete Initial Setup: Once Windows has restarted, wait a moment for the Ubuntu terminal window to appear. It will prompt you to create a new UNIX user account. Enter a username and a password. Note that Linux passwords do not show characters as you type them; this is normal security behavior. Confirm the password when asked.
- Verify the Installation: Open a new terminal window and type
uname -r. Press Enter. If the command returns a version number ending in "microsoft-standard," WSL is installed correctly and ready for use.
Common Mistakes
Users frequently encounter issues by skipping the restart step after running the initial install command. Without a reboot, the underlying virtualization components may not load, causing errors. Another common mistake is attempting to install WSL on Windows 10 versions older than 2004, which lack the necessary infrastructure. Additionally, some users try to run WSL commands in a standard Command Prompt instead of PowerShell or Terminal, which can lead to permission errors or unrecognized command failures.
Tips
You can choose different Linux distributions beyond the default Ubuntu. To see available options, run wsl --list --online in PowerShell. You can then install a specific distro, such as Debian or Kali Linux, using the command wsl --install -d [DistributionName]. For better performance with graphical applications, consider installing a Linux desktop environment like XFCE or GNOME, though this requires additional configuration steps outside the basic install. Always keep your WSL instances updated by running wsl --update periodically to ensure you have the latest kernel and security patches.
Troubleshooting
If the installation fails or the terminal does not open after reboot, first verify that your Windows build meets the minimum requirements. Check your version by typing winver in the Run dialog. If you receive an error about the Virtual Machine Platform, manually enable it by searching for "Turn Windows features on or off" in the Start menu and checking the box for "Virtual Machine Platform." Ensure Hyper-V is enabled in BIOS/UEFI settings if required by your hardware. If WSL runs but feels slow, ensure your files are stored within the Linux file system (/home) rather than accessing them from the Windows C:\ drive via the /mnt/c mount point, as cross-OS file operations are significantly slower.
Frequently Asked Questions
Can I use WSL on Windows 10?
Yes, but only on Windows 10 version 2004 (Build 19041) or higher. Older versions do not support WSL 2, which offers the best performance and compatibility.
Does WSL replace my main operating system?
No. WSL runs alongside Windows. You can switch between Windows apps and Linux terminals instantly without restarting or partitioning your hard drive.
Is WSL free?
Yes, the Windows Subsystem for Linux is completely free and included with Windows 11. There are no subscription fees for the core functionality.
How do I uninstall WSL?
To remove WSL, open PowerShell as Admin and run wsl --uninstall. This removes the subsystem and all installed Linux distributions. You may also need to manually disable the "Virtual Machine Platform" feature in Windows Features if you no longer need it.
Can I run GUI apps in WSL?
Starting with Windows 11, WSL supports GUI applications natively through the Windows X Server integration. You can launch Linux graphical programs directly from the terminal, and they will appear as standard Windows windows.