Skip to content

Guide · Open source

How to use WSLg: run Linux GUI apps on Windows

Updated · written with AI from the project's own documentation and checked against our catalogue data

WSLg is a feature of the Windows Subsystem for Linux that lets Linux graphical programs run on Windows as if they were Windows apps. This guide covers what you need, how to install or update it, how to launch GUI apps, and where it can go wrong. By the end you will be able to run a Linux GUI app from your Windows Start menu or terminal.

WSLgmicrosoft/wslg · ★ 12k · MIT

Quick start

  1. 1Confirm Windows is ready. Use Windows 11, or Windows 10 with all Windows Update patches installed. Update your GPU driver from the manufacturer's website.
  2. 2Install WSL with Ubuntu. In an administrator command prompt, run wsl --install -d Ubuntu, then reboot if asked.
  3. 3Set Linux credentials. After reboot, enter a Linux username and password. They can differ from your Windows login.
  4. 4Update an existing install. If WSL is already installed, run wsl --update from an elevated prompt and make sure your distro is on WSL 2.
  5. 5Update Ubuntu packages. Open Ubuntu and run sudo apt update to refresh the package list.
  6. 6Install a test app. Run sudo apt install x11-apps -y, then launch xeyes to confirm a window appears on Windows.
  7. 7Install your real tools. Use sudo apt install with the app name, then launch it from the Start menu under Ubuntu.

What WSLg is and when to use it

WSLg is short for Windows Subsystem for Linux GUI. It enables Linux GUI applications, both X11 and Wayland, to run on Windows in an integrated desktop experience. Linux apps can appear in the Start menu, show up in the taskbar, work with Alt-Tab, and support cut and paste between Windows and Linux apps.

It suits people who run Windows but need a tool that works best, or only works, on Linux. The project's README contrasts it with dual-booting, separate PCs, virtual machines, or running an X server on Windows and projecting it into WSL.

Check the requirements before you install

WSLg is supported on Windows 11 and Windows 10. Windows 10 must be fully up to date, so install all available updates through Windows Update first.

WSLg is available as part of the Windows 11 WSL inbox support and through the Windows Subsystem for Linux app from the Microsoft Store. The README recommends the Store version, which supports both Windows 10 and 11 and contains the most up-to-date WSL and WSLg.

For GPU acceleration, install the latest graphics driver from your GPU manufacturer's website.

  • Windows 10 (fully updated) or Windows 11
  • WSL 2 (WSLg does not work with WSL 1)
  • A current GPU driver from your GPU manufacturer (recommended)

Install WSL with Ubuntu on a fresh PC

If you have no prior WSL installation, open a command prompt with administrator privileges and run the install command. Reboot if prompted. After the reboot, installation continues and you will be asked for a Linux username and password. These can be anything you like and do not need to match your Windows credentials.

wsl --install -d Ubuntu

Update an existing WSL install to include WSLg

If you already have WSL without WSLg, run the update command from an elevated command prompt. Then confirm your distro runs in WSL 2 mode. WSLg only works with WSL 2, and a distro set to WSL 1 cannot communicate with WSLg or run GUI apps.

To list your distros and the WSL version each uses, run the list command. If a distro is on version 1, switch it to version 2; the README warns this can take a while. Then restart WSL. Save any open work first, because shutdown closes running WSL sessions.

  • Update: run wsl --update from an elevated command prompt or PowerShell
  • List distros and versions: wsl --list -v
  • Switch a distro to WSL 2: wsl --set-version <distro_name> 2 (replace the placeholder with your distro name)
  • Restart WSL: wsl --shutdown
wsl --update

Launch the Ubuntu distro and install a sample GUI app

Open Ubuntu from the Start menu. This starts the WSL 2 virtual machine, launches the Ubuntu distro inside it, and gives you a terminal. Inside Ubuntu, refresh the package list, then install the x11-apps package, which provides simple test programs.

Once installed, run xeyes, xclock or xcalc from the terminal. If a window opens on your Windows desktop, WSLg is working. The README notes that other distros may use a different package manager.

sudo apt update sudo apt install x11-apps -y xeyes

Run and find your Linux GUI apps

Installed apps appear in the Start menu under the distro name, for example Ubuntu then the app name. You can also launch them from a terminal. The README lists examples such as gimp, gedit ~/.bashrc, nautilus and vlc. It also shows how to install them with apt.

You can run several distros side by side. Each user distro is paired with its own system distro, and GUI apps in different user distros can still exchange cut and paste.

  • gimp, nautilus, vlc: launch from the terminal after installing with apt
  • gedit ~/.bashrc: opens a file in the editor
  • Browsers and Teams are installable too, but the README gives separate download steps for them
sudo apt install gimp -y sudo apt install vlc -y sudo apt install nautilus -y

Turn GUI support off or change servers

WSLg runs a system distro that hosts the WSLg X server, Wayland server and PulseAudio server. The environment variables DISPLAY, WAYLAND_DISPLAY and PULSE_SERVER are preset to point at these servers. You can change them to use a different server.

To disable GUI application support, add a setting to your .wslconfig file, located at c:\users\MyUser\.wslconfig. Replace MyUser with your Windows username.

[wsl2] guiApplications=false

What people use it for

  • Running a Linux-only scientific or engineering tool on a Windows workstation
  • Using GIMP, Gedit or VLC on Windows without a separate Linux machine
  • Running Linux desktop software for coursework on a Windows PC
  • Testing a Linux GUI application before deploying it on a Linux system

Frequently asked questions

Is WSLg free to use?

WSLg is open source under the MIT licence, and its source code is on GitHub at microsoft/wslg. The README does not list any price for it. Check Microsoft's current WSL documentation for any terms that apply to your setup.

Does WSLg work on Windows 10?

Yes. The README says WSLg supports Windows 10 as well as Windows 11, but Windows 10 must be fully updated through Windows Update. The Microsoft Store version of WSL is recommended for both versions.

Why won't my GUI app open in WSL?

The most common cause in the README is a distro still running in WSL 1 mode. WSLg only works with WSL 2, so check with wsl --list -v and switch with wsl --set-version. Also confirm your Windows updates and graphics driver are current.

Can I run a full Linux desktop with WSLg?

No. WSLg runs individual apps rather than a complete desktop session. If you want a full Linux desktop, you would need a different setup, such as a virtual machine or dual boot.

What are the alternatives to WSLg?

The project lists VcXsrv, Xming and X410 as comparable projects. These are X servers you run on Windows and connect to WSL. WSLg differs because it integrates apps into the Start menu, taskbar, Alt-Tab and clipboard, and it supports Wayland as well as X11.

How do I update WSLg?

Run wsl --update from an elevated command prompt or PowerShell, then run wsl --shutdown so the changes take effect. WSL restarts the next time you open a WSL app or terminal.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

WSLg suits developers, students and enthusiasts on Windows who need specific Linux GUI apps and already use WSL 2 or can set it up. It is a poor fit if you need a full Linux desktop, or if you are stuck on Windows 10 without updates or on WSL 1. In those cases, consider a virtual machine or an X server such as VcXsrv, Xming or X410.

Install options & downloads