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

Last update: 17/12/2025
Author Isaac
  • WSLg extends WSL 2 to allow running graphical applications of Linux integrated with the Windows desktop.
  • The current installation of WSL and WSLg is simplified with the single command wsl --install in recent Windows 10 and Windows 11.
  • WSL 2 offers better performance and compatibility than WSL 1 by using a real Linux kernel on a lightweight Hyper-V VM.
  • WSL/WSLg are ideal for development and testing on Linux from Windows, although they do not replace native production environments.

WSLg on Windows

If you work with Windows but need tools and environments on a daily basis Linux for developing, testing, or managing systemsWSL and WSLg have become the perfect pair. Thanks to these technologies, you can have a nearly complete Linux system on the same machine and, in addition, launch applications with a graphical interface as if they were native Windows programs, without struggling with virtual machines or complicated configurations, for example, by installing flatpak packages.

In the following lines you will see step by step How to install, configure, and get the most out of WSL and WSLg on Windows 10 and Windows 11, what commands You need to master how to choose the right version (WSL 1 or WSL 2), how it differs from a virtual machine, Docker, or the Boot dual, and what limitations you will encounter so you know when it is worth using it and when it is not.

What is WSL and what exactly does WSLg add?

The Windows Subsystem for Linux, or WSL (Windows Subsystem for Linux)It is a compatibility layer created by Microsoft that allows you to run GNU/Linux distributions (Ubuntu, Debian, Kali, openSUSE, Arch, etc.) within Windows, with access to their commands, development tools and services, without having to set up a complete virtual machine or install Linux in dual boot.

WSL 1 translated the Linux system calls so that it could understand them. the Windows kernel through an intermediate layerWSL 2, on the other hand, uses a small Hyper-V-based virtual machine with a real Linux kernel, which drastically improves performance, compatibility, and the ability to run things like Docker, complex network services, and utilities that require advanced kernel features.

Based on that, WSLg appears, which is nothing more than the graphical extension of WSL 2 and allows Run Linux applications with a windowed interface directly on the Windows desktopThis means you can open, for example, a graphics editor, a browser, or a design tool made for Linux and see it as a normal Windows window, with its icon in the taskbar and with copy/paste between systems.

One of the strengths of this approach is its integration with the file system, because with WSL and WSLg Windows and Linux can access the storage on the other sideFrom Linux you can see your drives NTFS with /mnt/c, /mnt/detc., and from the File Explorer you can access the WSL ext4 file system as if it were just another folder.

Furthermore, all of this happens without altering your main Windows installation, so if you break something in the Linux distro installed in WSL, You simply uninstall it or recreate it. And Windows will continue to function perfectly, which is very convenient for experimenting or learning without fear.

Requirements and compatible Windows versions

Before diving into WSLg, it's important to check that Your version of Windows properly supports WSL 2, since WSLg relies precisely on that second version of the subsystem.

To use modern simplified installation commands you need at least Windows 10 version 2004 (build 19041) or any version of Windows 11In these versions, a single command is all that's needed to install the entire environment, without going through menus of optional features or additional installers.

If you're on an earlier version of Windows 10, you can still use WSL, but you'll have to resort to manual installation and the most classic configuration (enabling features from the Control Panel, installing the kernel separately, etc.). In any case, it is always recommended to update the system to a modern build for security, performance, and compatibility.

In addition to the Windows version, you will need that in the BIOS or your computer's UEFI hardware virtualization is enabled (Intel VT-x, AMD-V or equivalent). Without that option, WSL 2 will not be able to start the lightweight virtual machine it uses underneath and you will see errors like 0x80370102 during installation.

In more demanding scenarios, such as WSLg with many open applications, or heavy Docker containers, it is also recommended to have at least 8 GB of RAM and an SSDso that the system doesn't lag every time you launch development environments, databases or graphic tools.

Install WSL and WSLg with a single command

The easiest way to get started these days is to use the built-in Windows command that sets up the entire Linux subsystem for you. The process is very simple: opens PowerShell or Symbol of the system with administrator permissions (right-click > “Run as administrator”) and run:

  The best way to Get Free Music on iPhone and Android

wsl --install

This command enables the necessary Windows features, downloads and installs the WSL package, and adds it by default. Ubuntu as a starting Linux distribution and also prepare the components for WSL 2. In the most recent versions of Windows 11, WSLg is installed as part of this same package, so you'll have graphics support right out of the box.

During the process you will see messages on the console informing you of the Package download, distro installation, and basic configurationWhen finished, Windows will ask you to restart your computer to complete the operation, as system components such as the Virtual Machine Platform have been enabled.

The first time you run the newly installed distribution (for example, by searching for “Ubuntu” in the Start menu), a terminal-like window will open, which will extract the base system and ask you Create your own username and password for LinuxThis information does not have to match your Windows account and will only be used within the distro.

If you prefer finer control, the same installation command allows several additional options, such as Choose distro, change location, or install without launching automatically the environment:

  • wsl --install --distribution Debian to install Debian instead of Ubuntu.
  • wsl --install --no-launch If you want the distro to be installed, but not open when finished.
  • wsl --install --web-download to force the download from the Internet instead of going through the Microsoft Store.

Manually activate WSL and WSL 2 (PowerShell, CMD and Windows features)

Although the previous command is the most direct, in some corporate environments or specific versions you may need to manually activate WSL components using “Windows Features” or administrative commands.

If you prefer the classic graphical method, you can open the Windows search bar and type "Windows Features". In the window that appears, check the boxes for “Windows Subsystem for Linux” and “Virtual Machine Platform”Confirm the changes and restart when prompted by the system to enable the services.

You can also do this from PowerShell with administrator privileges, which is very practical for scripts or Windows servers where you don't want to use graphical interfaces. To do this, run:

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

After restarting the computer, it will be time for virtualization. To activate the Virtual Machine Platform (required for WSL 2), you can use the DISM tool with this command in PowerShell or CMD high:

dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

In modern versions of Windows 10 (2004 onwards) and in Windows 11, this whole process is simplified to the point that the aforementioned is sufficient. wsl --install, But Knowing these commands can get you out of a tight spot. when something fails, when you need to automate deployments, or when WSL was installed before the new wizard existed.

Choosing a Linux distribution and managing multiple distros

Once you have the subsystem up and running, the next step is to decide which Linux distribution you want to use. By default, Windows installs Ubuntu, but you can List all available online distributions with:

wsl --list --online

The system will show you a distribution catalog Ready for WSL: various versions of Ubuntu, Debian, Kali Linux, openSUSE, etc. To install one of them, simply run:

wsl --install -d <NombreDistribucion>

Once installed, you'll see each distro as a standalone application in the Start menu Windows, with its own icon. You can open them from there or from PowerShell/CMD with commands like wsl -d Debian, according to each one's name.

To check which distributions you already have installed locally, and to find out if they are running on WSL 1 or WSL 2, use the command:

wsl --list --verbose

At the output you will see each distribution with its status (Running or Stopped) and its associated WSL version. If you want to have multiple distributions, that's perfectly possible: WSL supports as many Linux installations as you want.whether from the Microsoft Store, imported from TAR files, or even virtual disks .vhdx.

WSL 1 vs WSL 2: Which version to use and how to change it

Since the May 2020 update of Windows 10, Microsoft has made this available to users WSL 2 as a direct evolution of WSL 1The key difference is that WSL 1 was a translation layer, while WSL 2 relies on a lightweight Hyper-V virtual machine with a real Linux kernel, which significantly improves compatibility and performance.

WSL 2 solves many problems related to file access, service support, and performance in intensive input/output operations, to the point of achieving accelerations of several hundred percent in certain tasksFurthermore, the integration with File Explorer is better, you can access the ext4 system more directly, and it's much simpler to switch distributions or export/import environments.

  How to show hidden devices in Windows 11

To find out which version of WSL each of your installed distributions is using, you can run:

wsl -l -v

That command allows you to know which version of WSL each distro uses and plan whether it's worth migrating any to WSL 2.

If you want all new distributions you install from now on to be automatically created on WSL 2, set the default version with:

wsl --set-default-version 2

And if you already had a distro created some time ago on WSL 1 and now you want to take advantage of it The advantages of WSL 2 without reinstalling it from scratchYou can convert it with this command:

wsl --set-version <NombreDistribucion> 2

First boot, system update and basic commands

The first time you open a newly installed distribution (Ubuntu, Debian, etc.), you'll see the base environment finish configuring. Then, the system will ask you to Create a username and password for LinuxRemember that this account is separate from the one you use to log in to Windows.

Once inside you'll have a fully functional Linux terminal, so the best thing to do is update system packages just as you would on a physical computer or a virtual machine and decide whether Apply updates immediatelyIn the case of Ubuntu or Debian, the typical command would be:

sudo apt update && sudo apt upgrade

Next, you can start familiarizing yourself with some basic commands if you're just starting out with Linux. Instructions like ls, cd o pwd They allow you to list files, change directories, or know what path you are in:

  • ls Displays the contents of the current folder.
  • cd nombre_carpeta Change to a specific directory.
  • pwd Print the absolute path you are on.

If you're a developer, you'll find it very useful to be able to Install compilers, interpreters, servers, and frameworks directly here, just like you would on any real Linux server: git, Node.js, Python, PHPdatabases, message queues, etc.

How to open WSL and run commands from Windows

When you want to return to your Linux environment, you don't need to repeat the entire installation process, of course. You can open the distro in several ways: from the Start menu, from Windows Terminal, or from PowerShell/CMD using the command wsl.

If you want to work directly “inside” the Linux system, simply type wsl (or the name of the distribution, for example) ubuntu) in PowerShell. That will launch an interactive session of the default distro, and you'll see something like this at the prompt: usuario@equipo:~$.

Another very convenient option is Run a single Linux command from Windows without entering the shell. For example, from PowerShell you can list the contents of the current directory from a Linux perspective with:

wsl ls

If you want WSL to start directly in your home directory, you can use the shortcut ~ with the command:

wsl ~

That trick allows Start in your home directory without additional steps.

To change which distribution is considered default (the one launched when you don't specify a name), you can run:

wsl --set-default <NombreDistribucion>

This command is used to change the default distro In a simple way.

Windows Terminal: the ideal companion for WSL and WSLg

Although you can work with WSL from PowerShell or the classic CMD, the experience is greatly improved if you install Windows Terminal from the Microsoft StoreThis modern console application allows you to open multiple tabs and panels, each pointing to PowerShell, command prompt, different Linux distros, Azure CLI, and whatever else you need.

In Windows Terminal you can create specific profiles for each WSL distribution or for different types of shell, making it very easy Open a new tab directly in the distro you're going to useYou can also customize colors, fonts, keyboard shortcuts in Linux and backgrounds to easily distinguish each environment.

Once configured, Windows Terminal practically becomes the central tool from which to control Windows and Linux At the same time: a couple of tabs for your WSL code and scripts, another for logs on a remote server via SSH, another with PowerShell to manage Windows services, etc.

Even if you weren't going to use WSL, many developers have adopted Windows Terminal as their primary terminal, as it replaces older utilities like PuTTY and offers a much more modern experience that is integrated with the operating system and tools like Git.

WSLg: Using Linux graphical applications on Windows

WSLg emerged precisely to solve one of WSL's major historical shortcomings: the lack of a Official and well-integrated graphical environment for Linux applicationsUntil recently, if you wanted to use a full desktop or GUI programs from WSL, you had to resort to external X servers, VNC, or projects like Win-KeX (in the case of Kali).

With WSLg, Microsoft integrates a Wayland and X11-based graphical server within the subsystem itself, so that when you launch a Linux application with a graphical interface, it appears in the Windows desktop as a normal window plusIt integrates with the taskbar, can be pinned, and supports keyboard shortcuts and benefits from GPU graphics acceleration when available; you can check this with the Linux gpu-viewer command.

  How to group tabs in Firefox step by step

This opens the door to execution graphical text editors, IDEs, browsers, design and management tools Linux-specific features without abandoning Windows, while maintaining direct access to the file system and the rest of the native applications.

In distributions like Kali Linux, developers have created specific experiences such as WinKeXwhich allow you to open a full Kali desktop within a Windows window, or merge Kali graphical applications with the Windows environment so that both platforms coexist quite naturally.

While Microsoft finishes refining and extending these capabilities, WSLg already offers a more than solid foundation for those who want using Linux GUI without full virtual machinesAnd for those who were fleeing from manual configurations with X11 or RDP that caused quite a few headaches.

Practical advantages of using WSL and WSLg compared to other alternatives

From a developer's or administrator's perspective, WSL and WSLg address several common needs that previously required more cumbersome solutions. The main one is that You can develop in an environment virtually identical to production.which is often a Linux server, without abandoning the Windows desktop where you may be more comfortable or on which your company standardizes.

This means that libraries, runtime versions, package managers, databases, message queues, and other components you use in production may to be replicated very faithfully in your local environmentreducing the classic "it works on my machine" comments stemming from the differences between Windows and Linux.

For those learning Linux, WSL is also an excellent entry point, because it provides a sufficiently realistic environment and, at the same time, almost impossible to break irreversiblyIf the distro gets corrupted or you leave it in a mess, you delete it and start over, without affecting the host operating system.

Another significant advantage is hardware support. In equipment portableLinux on the desktop sometimes presents problems with drivers, including binary blobs in Linux, sleep, wifi or sound. In contrast, since in WSL the host system is Windows, All compatibility relies on Microsoft driversAnd the Linux distro sees a set of virtualized devices that usually work without any headaches.

Furthermore, interoperability between file systems is very powerful. You can mount ext4 formatted drives from Linux, but also access them from Windows. Linux drives via WSLThis is very useful if you have disks with that file system and need to recover files without installing third-party utilities.

Limitations and when WSL/WSLg is not enough

Despite all its virtues, WSL is not a native kernel running directly on the hardware, but rather WSL 2 relies on a Hyper-V virtual machineThis brings with it a number of natural limitations in terms of extreme performance, scalability, or access to certain very specific types of hardware.

In WSL 1, the absence of a true Linux kernel meant that tools like Docker simply couldn't function correctly, as they require kernel-level capabilities that this version didn't provide. WSL 2 fixes this, but there are still some issues. very demanding production scenarios in which a dedicated virtual machine or a physical server with Linux remains the most sensible option.

The network in WSL also goes through several layers of virtualization, which implies a certain performance cost. In services or tests where Very low-level network performance is criticalYou may notice more latency or limitations than on a natively installed Linux system.

There are also specific peripherals and scenarios (certain specialized USB hardware, some cards, etc.) that don't work well with the way Hyper-V exposes devices to the Linux subsystem. In these cases, you'll probably be better served by a classic virtual machine or a dual-boot setup.

Finally, there is an almost philosophical aspect: having Linux “hidden” within Windows and being able to run Linux graphical applications via WSLg, Many users stick with that layer. and they never experience what it's like to work on a complete Linux desktop, with its own window management, system philosophy, and application ecosystem.

How to install NVIDIA CUDA on Windows and Linux
Related article:
How to Install NVIDIA CUDA on Windows and Linux (WSL and Native)