Introduction

Windows has recently added support for GUI applications on the Windows Subsystem for Linux1. It is to make the use of WSL to feel as native as possible on Windows, which means that you can:

  • Launch Linux apps from the start menu.
  • Pin Linux applications to the taskbar.
  • Use alt+tab to switch between Linux and Windows apps.
  • Cut + Paste` across windows and Linux apps.

Prerequisites

  • Be on Windows 11 Build 22000 or higher. You can join the Windows Insiders Program to get the latest preview builds.
  • Install a driver for vGPU. It is to accelerate the OpenGL rendering. You can use:
    • Intel GPU driver for WSL2
    • AMD GPU driver for WSL3
    • NVIDIA GPU driver for WSL4

Fresh WSL Install

For a fresh WSL install, you need to install WSL first.

Open Powershell in administrator mode.

$ wsl --list --online

The following is a list of valid distributions that can be installed.
Install using 'wsl --install -d <Distro>'.

NAME            FRIENDLY NAME
Ubuntu          Ubuntu
Debian          Debian GNU/Linux
kali-linux      Kali Linux Rolling
openSUSE-42     openSUSE Leap 42
SLES-12         SUSE Linux Enterprise Server v12
Ubuntu-16.04    Ubuntu 16.04 LTS
Ubuntu-18.04    Ubuntu 18.04 LTS
Ubuntu-20.04    Ubuntu 20.04 LTS

$ wsl --insall -d Debian
Downloading: Debian GNU/Linux
Installing: Debian GNU/Linux
Debian GNU/Linux has been installed.
Launching Debian GNU/Linux...

The first command will list the available distributions from which you select the one you want to install. In my case I installed Debian.

Existing WSL install

If you already use WSL, you just need to update and restart WSL.

$ wsl --update
Checking for updates...
No updates are available.
Kernel version: 5.10.60.1

$ wsl --shutdown

Running a GUI application

You need to update the packages of the selected distribution from it’s terminal.

$ sudo apt update && sudo apt upgrade -y

You can install a GUI application. I will install gedit

$ sudo apt-get install gedit -y

To start the GUI application gedit you need to invoke it like this:

$ gedit

Now you can start the gedit application on an untitled document.


  1. https://docs.microsoft.com/en-us/windows/wsl/tutorials/gui-apps ↩︎

  2. https://www.intel.com/content/www/us/en/download/19344/intel-graphics-windows-10-windows-11-dch-drivers.html ↩︎

  3. https://www.amd.com/en/support/kb/release-notes/rn-rad-win-wsl-support ↩︎

  4. https://developer.nvidia.com/cuda/wsl ↩︎