# WSLg: running Linux GUI apps on Windows through WSL 2

> WSLg is Microsoft's in-box support for X11 and Wayland applications inside the Windows Subsystem for Linux. It installs with WSL itself, and it only works on WSL 2.

**microsoft/wslg** — Enabling the Windows Subsystem for Linux to include support for Wayland and X server related scenarios

- Repository: https://github.com/microsoft/wslg
- Stars: 11,935 · Forks: 429
- Language: C++
- License: MIT
- Published: 2026-09-21 · Updated: 2026-09-21 · Language: en
- Canonical page: https://hysenlabs.com/projects/microsoft-wslg

## The problem WSLg solves for Windows developers

Before WSLg, running a Linux GUI program on a Windows machine meant picking a workaround. The README lists them: two PCs, one dedicated to Windows and one to Linux; a virtual machine hosting either operating system; or an X server running on Windows with the display projected into WSL. Each of those separates the Linux application from the Windows desktop in some way. WSLg's stated purpose is to remove that separation by making Linux GUI applications feel native, with Start Menu entries, taskbar presence, alt-tab behaviour, and cut and paste across Windows and Linux applications.

The target user is named fairly precisely in the README: developers, scientists or enthusiasts who prefer or need to run Windows on their PC but also need tools that work best, or exclusively, in a Linux environment. That is a narrower audience than "anyone who uses WSL". If your Linux work is entirely terminal based, WSLg adds nothing you will notice. It matters when the application has a window.

## How WSLg fits into the WSL 2 architecture

WSLg is not a separate download you install on top of WSL. The README describes it as available both as part of the Windows 11 WSL inbox support and through the Windows Subsystem for Linux package from the Microsoft Store, and it calls the Store version the recommended one because it supports both Windows 10 and Windows 11 and carries the most up to date WSL and WSLg. In practice that means the component ships inside WSL and is versioned with it.

The repository layout reflects that split. WSLGd/ holds the daemon side, WSLDVCPlugin/ holds an RDP-related plugin, and there are config/, package/, rdpapplist/, resources/ and vendor/ directories, plus a Microsoft.WSLg.nuspec and Microsoft.WSLg.targets at the top level. The README's architecture section names the user distro as the WSL distribution you use for Linux work, notes that you can run several side by side, and states that each user distro is paired with a unique instance. The full diagram is an image in docs/, and the README text stops there, so the exact process topology is not spelled out in prose.

One constraint is stated without hedging: WSLg is only compatible with WSL 2 and will not work for a distribution configured in WSL 1 mode. A distro left in version 1 mode can still run after WSLg is installed, but it cannot communicate with WSLg and cannot run GUI applications.

## Installing WSLg and launching a first GUI application

On a machine with no prior WSL installation, the README gives a single command from an administrator command prompt, followed by a reboot if prompted. After the reboot the installation continues and asks for a Linux username and password, which do not have to match your Windows credentials.

```bash
wsl --install -d Ubuntu
```

If WSL is already installed and you want the version that includes WSLg, the README says to run the update command from an elevated prompt.

```bash
wsl --update
```

Before going further, confirm that your distribution is actually running in WSL 2 mode. The README uses this command to list installed distros and the version each is configured for.

```bash
wsl --list -v
```

If a distro reports version 1, the README's command to convert it is below. It notes this can take a while.

```bash
wsl --set-version _distro_name_ 2
```

Restarting WSL is required for changes to take effect, and the README warns to save pending work first because a running WSL instance will shut down.

```bash
wsl --shutdown
```

With that done, install a GUI package from inside your Linux terminal. The README's example set includes gedit, GIMP, Nautilus, VLC, x11-apps, Google Chrome, Microsoft Teams and Microsoft Edge Dev, with x11-apps being the smallest way to prove the display path works.

```bash
sudo apt update
sudo apt install x11-apps -y
```

Launch `xcalc`, `xclock` or `xeyes` from the terminal. You should see a window appear on the Windows desktop, and installed applications also show up in the Start Menu under the distribution name, for example Ubuntu, then the application. That Start Menu entry is the observable difference between WSLg and a manually configured X server.

## Where WSLg stops being the right tool

The WSL 1 boundary is the hard one. A distribution in version 1 mode cannot talk to WSLg, so any workflow pinned to WSL 1 has to move to WSL 2 or go without GUI support. The README frames the conversion as potentially slow, and it is a per-distro operation, so a machine with several distros needs each one checked with `wsl --list -v` rather than assumed.

Windows 10 is a softer boundary. WSLg is documented as supported on both Windows 11 and Windows 10, but Windows 10 users are told to make sure the installation is fully up to date through Windows Update first. That is a real dependency, not a formality: on an unpatched Windows 10 machine you should expect to update before WSLg behaves.

Graphics is the third. The README says to update your graphics driver from your GPU manufacturer's website to benefit from GPU acceleration in the WSL environment. It does not promise that acceleration works with a driver delivered some other way, and it does not describe a fallback path when the driver is old. If your work depends on GPU-accelerated rendering, the driver is the first thing to check, not the last.

Finally, the README documents installation, updating and first launch, but it does not document rollback or a way to remove WSLg independently of WSL. If you need a clean uninstall story before you commit, the README is silent on it.

## WSLg compared with running an X server on Windows

The alternative the README itself names is an X server running on Windows with the display projected into WSL. That approach is a separate program you install, configure and keep running, and it is display-only: it gives X11 clients somewhere to draw, and the integration work around it (window management, clipboard, Start Menu entries) is yours to assemble. WSLg instead ships inside WSL, starts with the subsystem, and carries the integration with it, which is why the README can talk about Start Menu launch and alt-tab as default behaviour rather than setup steps.

The other alternatives in the README are heavier: a second PC dedicated to Linux, or a virtual machine hosting either operating system. Those give you a complete Linux environment, including a full desktop, which WSLg deliberately does not. WSLg runs individual applications, not a Linux desktop session, and the README's own examples are single applications: gedit, GIMP, VLC, Chrome. If you want a full Linux desktop with its own window manager, a VM is the more direct answer, and WSLg is the wrong tool for it.

## Maintenance, licensing and upgrade cost

The repository is not archived, and the last push was on 2026-07-06. Releases are frequent enough to matter for anyone pinning a version: v1.0.71 on 2025-10-06, v1.0.69 on 2025-08-07, and v1.0.66 on 2025-02-26. Because WSLg is delivered as part of WSL, the upgrade path in the README is a single command, `wsl --update`, followed by `wsl --shutdown` to restart. There is no separate WSLg installer to track, which removes one upgrade chore but also means you cannot hold WSLg at an older version while moving WSL forward.

That coupling is the real maintenance cost. A WSL update carries WSLg with it, and the README's instruction to restart WSL after updating means a running session ends. Teams that treat WSL as a stable base should decide in advance when updates happen, because the update and the restart are the same operation.

The licence is MIT, per the repository. MIT is permissive and permits reuse and redistribution with the licence and copyright notice retained. This is a description of the licence identifier, not legal advice; if you redistribute WSLg components, read the LICENSE file and NOTICE-mesa.txt in the repository, since the tree vendors third-party code under vendor/ and NOTICE-mesa.txt points at Mesa's own terms.

## Conclusion

WSLg is the right choice if you already run WSL 2 on Windows 11, or on a fully updated Windows 10, and you want Linux GUI applications in the Start menu without a separate X server or a second machine. It is the wrong tool if your distributions are pinned to WSL 1, since the README states that a distro in version 1 mode cannot communicate with WSLg at all. Before you rely on it, run wsl --list -v to confirm every distro you care about reports version 2, and check that your GPU driver comes from the manufacturer's site rather than Windows Update, because the README ties GPU acceleration to that driver.

## FAQ

### What is WSLg in Windows Subsystem for Linux?

WSLg stands for Windows Subsystem for Linux GUI. Its purpose is to enable running Linux GUI applications, both X11 and Wayland, on Windows with an integrated desktop experience that includes Start Menu launch, taskbar presence and cut and paste across Windows and Linux applications.

### How do I enable WSLg on Windows?

There is no separate WSLg switch. On a fresh machine, run wsl --install -d Ubuntu from an administrator command prompt and reboot if prompted; on an existing WSL installation, run wsl --update from an elevated prompt. WSLg is only compatible with WSL 2, so a distribution in WSL 1 mode cannot use it.

### How do I open the WSL GUI?

Install a GUI package inside your Linux terminal, for example sudo apt install x11-apps -y, then launch xcalc, xclock or xeyes. The window appears on the Windows desktop, and installed applications also appear in the Start Menu under the distribution name.

### Why is WSL on my PC?

The README does not address how WSL came to be installed on a given machine. It only describes how to install WSL and WSLg and how to run Linux GUI applications with them.

## Sources

- [Issues](https://github.com/microsoft/wslg/issues)
- [License: MIT](https://github.com/microsoft/wslg/blob/main/LICENSE)
- [microsoft/wslg on GitHub](https://github.com/microsoft/wslg)
- [README](https://github.com/microsoft/wslg/blob/main/README.md)
- [Releases](https://github.com/microsoft/wslg/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/microsoft-wslg
