Installing Linux on Windows 11 with WSL2 and Ubuntu: a complete guide

Last update: 17/04/2026
Author Isaac
  • WSL2 allows you to run Linux distributions with a real kernel and deep integration on Windows 10 and 11 without resorting to dual boot or heavy virtual machines.
  • The installation is based on enabling the subsystem and virtual machine platform, using wsl --install and adding distros like Ubuntu from the Microsoft Store.
  • WSL2 offers great performance and compatibility for development and administration, although it does not replace a native Linux in full server or desktop scenarios.
  • With Windows Terminal and Docker, WSL2 becomes a very powerful working environment, maintaining direct access to the Windows ecosystem and tools.

Installing Linux on Windows 11 with WSL2 and Ubuntu

Using Linux within Windows 11 with WSL2 and Ubuntu It has become one of the most convenient ways to have the best of both worlds without struggling with partitions. double starts Nor do you need heavyweight virtual machines. If you're coming from Linux or simply need typical GNU/Linux tools for development, system administration, or testing, you'll want to take full advantage of this feature.

In this article you will see What exactly are WSL and WSL2, their advantages and disadvantages compared to a virtual machine or a dual boot, the actual requirements you must meet, how to install the subsystem step by step on Windows 10 and Windows 11, how to add Ubuntu (or other distros), how to work with them from Windows Terminal, plus some tricks, advanced uses and common problems you may encounter.

What is WSL and why does it matter in Windows 10 and Windows 11?

Windows Subsystem for Linux WSL and WSL2

WSL (Windows Subsystem for Linux) It's a feature built into Windows 10 and Windows 11 that allows you to run GNU/Linux distributions as if they were just another system application. Instead of setting up a dual boot or a full virtual machine, you install a distribution (Ubuntu, Debian, Kali, Fedora, Alpine, SUSE, Arch, etc.) from the Microsoft Store and use it in a terminal window with access to most Linux command-line tools.

The first generation, known as WSL1 translates Linux calls to the Windows kernel through a compatibility layer. This allows many tools to work very well, but it has limitations with applications that need low-level kernel access or certain network and file system capabilities.

With WSL2, Microsoft took an important leapNow, a full Linux kernel runs inside a lightweight virtual machine managed by Windows' own virtualization platform (Hyper-V at a low level). This provides almost complete compatibility with system calls and significantly improves performance in many tasks, even surpassing native Windows in synthetic benchmarks like Geekbench in certain scenarios.

The beauty of it all is that WSL2 doesn't feel like a typical virtual machineIt integrates with the Windows file system, boots in seconds, consumes much less memory than a traditional VM, and is managed like any other application, without complex panels or complicated configurations.

For developers, administrators, and curious users, this means that You can have the same tools as in a native Linux system. (bash, git, ssh, Docker, servers, compilers, package managers, etc.) working side by side with PowerShell, File Explorer and the rest of the Windows ecosystem.

Key differences between WSL and WSL2

Comparison of WSL1, WSL2 and virtual machine

Although they may look the same from the outside, WSL1 and WSL2 work very differently underneathAnd that impacts performance, compatibility, and resource usage. It's important to understand the differences to know when it's worth using each one.

With WSL1, Linux works through a translation layer This converts system calls (syscalls) into calls compatible with the Windows kernel. This results in very low resource consumption and extremely fast boot times, but limits compatibility with software that relies on a real kernel, especially services that require advanced networking features, file systems, or kernel modules.

En WSL2 does indeed have a real Linux kernel running inside a small VM It uses Hyper-V technology, but packaged so seamlessly that the user barely notices. This dramatically improves compatibility (you can use native Docker, more complex servers, databases, etc.) and performance in I/O operations, heavy compilations, or intensive disk access.

Regarding integration, Both versions allow sharing the file system with Windows and execute commands from PowerShell or the command prompt, but WSL2 has greatly improved access to /mnt/ and the rest of the drives, to the point that you can navigate to your Linux file system from the File Explorer itself.

To summarize the main idea: WSL1 is very lightweight but somewhat limited.While WSL2 offers almost full compatibility with real Linux. at the cost of relying on a VM so optimized that, in practice, it doesn't feel like a traditional virtual machine.

Requirements for installing WSL and WSL2 on Windows 10 and Windows 11

Before you launch, you need to check that your team meets the requirements. the minimum system requirements for WSL and WSL2especially if you're still on Windows 10.

To WSL (first version)Virtually any updated 64-bit version of Windows 10 or 11 will work. What you really need to focus on are the system requirements. WSL2:

  • Windows 10 x64- Version 1903 or later, with build 18362 or higher.
  • Windows 10 ARM64: version 2004 or later, with build 19041 or higher.
  • Windows 11It includes WSL2 support almost as standard, provided it is updated.

If your system is below those builds, you will not be able to use WSL2 although WSL1 is supported. The solution involves updating Windows with Windows Update or the official Microsoft update assistant.

To check the exact version of your system, simply Open the Run window by pressing Windows + R and typing "winver"There you'll see both the version and the build number. If you see something like 1903, 2004, 20H2, 21H1, 21H2, etc., you're generally on the right track for WSL2.

At the hardware level, you need 64-bit processor with virtualization support (VT-x on Intel, AMD-V on AMD) and that this option is enabled in the BIOS/UEFI. You can check virtualization easily by opening Task Manager (Ctrl+Shift+Esc), Performance tab, CPU section, and verifying that the "Virtualization" field appears as "Enabled".

  How to Identify a Drive's File System in Windows 11

How to quickly install WSL2 on Windows 11

In Windows 11 (and in relatively modern Windows 10) The simplest way to install WSL2 is with a single command, without having to manually check boxes in the optional features.

You only have to open PowerShell as administrator (right-click on the Start button → Windows Terminal (Admin) or PowerShell (Admin)) and launch:

wsl -install

With this command, Windows automatically enables the necessary features For WSL and WSL2, install the virtual machine platform and download the default Linux distribution (usually Ubuntu these days). Once finished, you will be prompted to restart your computer to complete the setup.

The first time you boot the newly installed distro, a console will open where The Linux files are decompressed and configured.This process takes a little while only the first time; subsequent runs will start in less than a second.

If you want to change the distribution that is installed by default, you can use the parameter -d in the installation command itself, or list all available options with:

  • wsl.exe –list –online to see the distros available in the store.
  • wsl.exe –install DistroName to install a specific one (for example, Ubuntu, Debian, Kali-linux, openSUSE, etc.).

Step-by-step installation of WSL2 on Windows 10

If you're still using Windows 10 or prefer to control the process manually, You can activate WSL and WSL2 in several very clear stepseither from the graphical interface or through PowerShell commands.

From the traditional interface, what you need to do is Open the Windows optional features window. Press Windows + R, type OptionalFeatures.exe and accept. In the list that appears, check at least these boxes:

  • Windows subsystem for Linux (Windows Subsystem for Linux).
  • Virtual machine platform (VirtualMachinePlatform), required for WSL2.

After applying the changes, Windows will install the components and It will ask you to restart the systemDo this to ensure successful activation.

If you prefer the console route, you can achieve the same thing. running a few DISM and PowerShell commands with administrator permissions:

  • Enable the Linux subsystem: dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
  • Activate the virtual machine platform: dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all

After these steps, restart manually. It is then recommended Install the Linux kernel update for WSL2Microsoft distributes it in its own installer. It can be downloaded from the official WSL website (in an Azure blob) and you just need to follow the classic "Next → Next → Finish" wizard.

Finally, it is worth clarifying that WSL2 will be the default version When you install new distributions. To do this, open PowerShell as administrator and run:

wsl --set-default-version 2

With this, every time you download a Linux distribution from the Microsoft Store, It will be configured by default on WSL2 instead of WSL1.

Install Ubuntu and other Linux distributions from the Microsoft Store

Once the subsystem is operational, Now you need to choose the GNU/Linux distribution you want to use.The easiest way is to search for it in the Microsoft Store, just like you would install any other application.

Open the Microsoft Store and type "Ubuntu" or simply "Linux" in the search engine. You'll see a list of WSL-compatible distributions, including:

  • Ubuntu (in various LTS versions, such as 20.04 or 22.04).
  • debian
  • Kali Linux.
  • openSUSE / SUSE Linux Enterprise.
  • Fedora, Alpine, Arch and other variants, depending on the time.

Select the one you're interested in, then click on Install or Get and let Windows download and install the image. When it's finished, you'll have a new icon in the Start menu with the name of the distro (for example, "Ubuntu 20.04 LTS").

The first time you run it, the internal installation will be completed and You will be asked to create a Linux username and passwordThese accounts don't have to be linked to your Windows account; they're separate accounts. After this, you'll be able to use the distro in terminal mode whenever you want.

If for any reason your Ubuntu was initially installed as WSL1, you can convert it to WSL2 by running the following command in PowerShell (as administrator):

wsl –set-version Ubuntu-20.04 2

Adjust the distro name if you are using a different version or distribution. The system will perform the conversion and, at the end, will display a message such as "Conversion completed" indicating that it is now running on WSL2.

Managing versions, distributions, and basic WSL commands

Once you have several distros installed, it's useful to know how to list, change, and execute each of them without overcomplicating things.

To see which distributions you have installed and which version of WSL each one runs with, use:

wsl.exe –list –verbose

There you'll see the name, the status (running or stopped), and whether it's running on WSL1 or WSL2. If you want to change the default version of any installed distro, the command is:

wsl.exe –set-version DistroName 1 o wsl.exe –set-version DistroName 2

If what you're interested in is that All new distributions are installed directly on WSL2, keep:

wsl.exe –set-default-version 2

You can also decide which distribution will be the default when you simply run wsl from PowerShell. To do this:

wsl.exe –set-default DistroName

And if you just want to run a specific command without fully entering the interactive shell, it's as simple as:

wsl

For instance, wsl ls will list the contents of the current directory in the Linux environment, while wsl pwd It will show you the path as seen from the distro's file system.

Using Ubuntu and other distros from Windows Terminal

With Windows 11 (and also in Windows 10 if you install it from the Store) you have Windows Terminal, a modern console application that unifies CMD, PowerShell, and WSL into a single interface with tabs, panels, and advanced customization.

Windows Terminal automatically detects installed WSL Linux distributions, so You can open new tabs directly with Ubuntu, Debian, Kali, etc. without needing to launch each distro from its individual icon.

Among the advantages of Terminal are Multiple tabs, split panels, full Unicode and UTF-8 support, graphical acceleration for text rendering and the ability to customize color schemes, fonts, backgrounds and even keyboard shortcuts to your liking.

To work comfortably, it is common Configure a profile for each WSL distro and switch between them and PowerShell depending on what you're doing: for example, compiling code in Ubuntu, launching scripts in Debian, or managing services in Kali, all from the same window.

  How to restore Windows 11 without losing your personal files

If at any point you open a WSL session within PowerShell and want to return to the Windows shell, simply type exit to exit that Linux session and return to the original interpreter.

Advantages of WSL2 over virtual machines and dual boot

Beyond the technical curiosity, WSL2 has very practical advantages compared to setting up a VM with VirtualBox/VMware or a dual boot systemespecially if your main focus is systems development or administration.

Regarding resources, WSL2 is much lighter than a traditional virtual machine.Memory and CPU are managed dynamically and are only reserved when the distro is running. You don't have to allocate 4, 8, or more GB of RAM beforehand as you would with a VM, which is invaluable if your computer is short on memory.

In terms of speed, Booting a distro in WSL2 is almost instantaneousThis is a far cry from the seconds (or even minutes) it can take to load a complete Linux system in VirtualBox. For everyday tasks like compiling, running services, using Docker, or handling command-line tools, the experience is incredibly fast.

Furthermore, The integration with the Windows file system is far superior to that of a VM. You can access your Windows folders from Linux using paths like /mnt/c, and also navigate to the contents of your distro from the File Explorer, without bulky shared folders or anything like that.

Compared to dual start, the big difference is that You don't have to restart your computer to switch from Windows to LinuxYou can have both at the same time and move data between the two environments seamlessly. Linux can read without problems. NTFS partitionsWindows can access ext4 file systems via WSL, thus filling a gap that previously required third-party tools.

However, if what you're looking for is Unlock the full potential of Linux with a complete graphical environmentDespite maximum driver flexibility and intensive network and hardware usage, a native or dual-boot system remains the most powerful option. WSL2 doesn't aim to replace all possible scenarios, but rather to greatly simplify those where a full Linux desktop isn't needed.

Limitations and drawbacks of WSL and WSL2

Although WSL2 has improved a lot compared to WSL1, not everything is perfect And there are several limitations that you should be aware of so you don't get any surprises when changing your workflow.

To begin with, WSL1 has no real kernel supportTherefore, tools like Docker or services that rely on advanced kernel features may not work correctly or may require workarounds and additional layers. This has been resolved in WSL2, but it's always advisable to check which version you're using.

In WSL2, although there is a real Linux kernel, The network and certain peripherals continue to go through additional layersThis can cause some overhead in very specific network tasks or when handling certain USB and serial devices. For most users, this isn't a problem, but for certain production environments or very specific hardware, it can be a bottleneck.

Another important issue is that WSL distros are not designed as classic serversMany systems don't start systemd by default, which complicates running services like persistent daemons in the style of a traditional Linux server. While there are ways to work around this limitation or use custom scripts, it's not the ideal approach for large production workloads.

There is also a conceptual limitation: since it runs within Windows, It's easy to fall into the temptation of thinking that it's not worth learning or installing a full desktop Linux system.WSL offers a powerful terminal environment, but it does not replace the full Linux desktop experience with its window manager, native drivers, and ecosystem of visual applications.

In summary, WSL is fantastic for development, testing, scripting, automation, and administration.However, it is not designed as a replacement for a real Linux server or as a high-performance production platform, even though it comes close in performance in many cases.

WSL versus Docker and other virtualization systems

It's easy to confuse concepts, so it's important to distinguish them clearly. WSL, classic virtual machines, and containers like Dockerbecause each technology solves a different problem.

A virtual machine (VirtualBox, VMware, Hyper-V classic) It runs a complete, isolated operating system. From the host. You allocate fixed resources and run a Linux system with its desktop, services, and everything else you want, but the cost in RAM and CPU is higher and the integration with Windows is relatively limited.

WSL2, on the other hand, It relies on a lightweight and highly controlled VM to run only what Linux needs, fully integrating it with Windows: shared file system, near-instant boot, flexible resource consumption, and the ability to run Linux commands directly from PowerShell.

Docker takes a different approach: Containers are not complete operating systemsInstead, they are minimal environments in which a specific application or service runs, isolated from the rest. Each container is based on an image with only the essentials to run its program, making them very lightweight and easy to deploy on a large scale.

The huge advantage of WSL2 here is that It allows you to use Docker natively on a real Linux kernel within WindowsThis avoids many of the workarounds that were needed years ago. For development, this combination of Windows + WSL2 + Docker offers a very powerful environment for simulating production without leaving your Windows desktop.

Ultimately, WSL2 and Docker complement each other rather than compete: the first gives you a complete Linux in a terminal integrated into Windows, and the second allows you to package specific services within that Linux (or other environments) in an isolated and reproducible way.

Graphical environment, Win-KeX and future WSL improvements

For quite some time, WSL was limited to terminal useAnd if you wanted a graphical environment, you had to set up third-party solutions with X servers or specific tools. A notable example is Win-KeX (Windows Kali Desktop eXperience), a solution from the creators of Kali Linux that offers a complete Kali desktop through an integrated VNC session with Windows.

  Where scanned documents are saved in Windows 11 and how to find them

Win-KeX allows Run Kali graphical applications within Windows It's like a virtual machine, but with a more seamless integration. It even offers modes where Linux windows blend with Windows windows, giving the impression that everything is part of the same desktop.

At the same time, Microsoft has been moving towards official graphics support within WSL2with the idea of ​​allowing Linux GUI applications to run more easily. Modern versions of Windows 11 already include official support for many graphics applicationsAnd the company continues to work on more user-friendly interfaces for managing and installing distros without relying so heavily on the console.

For those who prefer to avoid commands, Dedicated graphical interfaces for WSL are being explored that make installing, updating, and managing distributions even easier. Although many advanced users will continue to prefer the terminal, an extra visual layer could encourage more people to use Linux from within Windows.

Although the exact roadmap keeps changing, The trend is clear: more integration, more performance, and more ease of use.All this without losing the ability to continue controlling WSL step by step from the command line for those who need it.

Common problems when using WSL and how to solve them

In the real world, it's quite common to encounter Errors and cryptic messages when activating WSL or installing distrosMany of these issues are related to permissions, older versions of Windows, or virtualization settings.

One of the most common mistakes appears when enable the Windows Subsystem for Linux from Windows features. If the system throws an error when enabling it, first check that you have Windows fully updated and that you are performing the operation with an account with administrator privileges.

Another recurring problem is the Errors when installing a distribution from the StoreThese errors are usually caused by corrupted downloads or a damaged Windows configuration. Verify that you have a stable internet connection, that the disk is installed on the same drive as Windows (usually C:), and that there are no restrictions in the Microsoft Store.

Error codes of the type [type missing] are also common 0x80070003 or 0x80370102 during the distro installation. In many cases, they indicate that Virtualization is not enabled in the BIOS/UEFI Or the Windows Virtual Machine Platform may not be enabled correctly. Enter the BIOS settings, enable the VT-x/AMD-V options, and check in the Windows features that "VirtualMachinePlatform" is selected.

If you see a message like this "WSL has no distribution installed" Even after downloading it, make sure you've booted the distro at least once from the Start menu before trying to invoke it from the command line. Windows won't register it correctly for WSL until that first boot is complete.

Finally, when trying to switch to WSL2, you might see something like this: «WSL 2 requires an update to its kernel component»This message means you're missing the Linux kernel update package for WSL2. Simply download the official installer from the Microsoft website, run it, and restart; from there, you should be able to perform the version conversion command without any problems.

Going back to Windows using WSL2 instead of a native Linux?

Many users who have spent some time using pure Linux wonder Does it make sense to revert to Windows and use WSL2 as the primary working environment? or even migrate from Windows to LinuxThe answer depends a lot on the type of tasks you perform and your personal preferences.

In synthetic tests such as Geekbench 6, it has been observed that Ubuntu on WSL2 can perform on par with native Ubuntu and even outperform Windows itself in certain single-threaded scenarios. For development work, data science, containers, Spark, SQL on Linux, and similar tasks, WSL2 typically offers more than enough performance, with the added advantage of still having the entire Windows ecosystem (Office, games, specific drivers, graphics tools) readily available.

If your needs are focused on console, development tools, Docker, and backend servicesWSL2 is a very solid option. You can mount drives from Windows, work with file systems like ext4 or even ZFS/XFS in certain scenarios, and continue integrating everything with Hyper-V, Docker Desktop, and other tools.

On the other hand, if your workflow relies heavily on the Linux desktop, extreme customization of the graphical environment, the use of specific hardware drivers or very fine control over booting and system services, then a natively installed or dual-boot Linux will still be more appropriate.

In practice, more and more developers are opting for Use Windows 11 as the base system and WSL2 as the main Linux working environment.This maintains maximum flexibility. As long as you are aware of the limitations (especially regarding production and persistent services), the Windows + WSL2 + Ubuntu combo is a very powerful combination for everyday use.

With everything we've seen, it's clear that WSL2 has completely transformed the way Windows and Linux are combined.You can switch between both without restarting, take advantage of the tools in each world where they shine the most, and set up a very serious development environment without getting bogged down with partitions or heavy virtual machines, something especially useful both for those coming from Linux and for those starting to explore free software from the comfort of Windows.

How to use WSLg on Windows
Related article:
How to use WSLg on Windows to run Linux with a graphical interface