Guide for Installing War-Linux Subsystem (WSL 2) on Window 10 and Window 11 Operating Systems
Setting Up and Managing Windows Subsystem for Linux (WSL) 2 on Windows 10 and Windows 11
In this article, we'll guide you through the process of setting up and managing Windows Subsystem for Linux (WSL) 2 on your Windows 10 or Windows 11 system. WSL allows you to run actual Linux inside Windows without the need for a virtual machine.
Step 1: Enable WSL and Virtual Machine Platform Features
To begin, you'll need to enable the necessary features. Open PowerShell or Command Prompt as an administrator and execute the following commands:
Restart your PC to apply these changes.
Step 2: Set WSL 2 as Default Version
After rebooting, open PowerShell or Command Prompt as an administrator and run the following command to set WSL 2 as the default version for newly installed Linux distros:
Ensure that virtualization is enabled in your BIOS settings (Intel VT-x, AMD-V) beforehand.
Step 3: Install a Linux Distribution
Head over to the Microsoft Store and search for your preferred Linux distro, such as Ubuntu 20.04 LTS, Debian, or Kali Linux. Install the distro and launch it from the Start menu. Follow the prompts to create a user name and password.
Step 4: Switch WSL Version Per Linux Installation
To check the installed distros and their WSL versions, use the following command:
To change the version of a specific distro (for example, "Ubuntu-20.04") between WSL 1 and WSL 2, use the following commands:
To set WSL 1 as the default for new distros, run:
(Replace with for WSL 2 as the default.)
Step 5: List Installed Linux Distributions and Their WSL Versions
To view all installed distros and their version numbers, run either of the following commands:
The latest version of WSL, WSL 2, offers significantly better performance due to its use of a proper Linux kernel. However, if you wish to use WSL 1 alongside WSL 2, you'll need to enable the optional Windows Subsystem for Linux component by adding to the install command or by using a separate command in PowerShell as an administrator.
For a seamless experience, consider using the Windows Terminal app from the Microsoft Store, which allows you to run multiple shells, including PowerShell, Linux, Azure Cloud Shell, and Command Prompt, all open together side-by-side in one window.
You can launch a specific Linux distro installation in PowerShell with a command, and WSL can be downloaded directly from the Microsoft Store. The simplified installation process will pull the latest version in.
These steps apply to both Windows 10 and Windows 11 with minor UI differences and are the current recommended procedures in 2025.
- To run Linux inside Windows without a virtual machine, you can use Windows Subsystem for Linux (WSL) 2, a technology developed by Microsoft.
- While setting up WSL 2 on Windows 10 or Windows 11, it's crucial to enable the necessary features like Virtual Machine Platform in the PowerShell or Command Prompt.
- Xbox, another Microsoft product, may not be directly connected to setting up and managing WSL 2, but they both share the software development and innovation ethos in technology.
- Microsoft Azure, a cloud computing service, actively collaborates with Linux distributions for better integration, enhancing the overall technology landscape.
- Apart from Linux distributions available in the Microsoft Store like Ubuntu, Debian, or Kali Linux, you can also update your PC running Windows 10 or Windows 11 with the latest Windows software releases, further improving your overall technology experience.