Windows OS

How to Run Linux GUI Applications on Windows 11 Using WSL

Windows 11 has been officially released, and one of the most exciting new features all avid Linux users can appreciate is the ability to easily run graphical Linux applications using the Windows Subsystem for Linux version 2.

What Is the Windows Subsystem for Linux (WSL)?

WSL is a virtualization technology that makes it possible to run the Linux kernel and Linux binary executables inside a lightweight virtual machine on Windows in a fully integrated desktop experience.

Microsoft first released WSL in 2016, and the company has been improving it ever since. The latest major release, WSL 2, is available to users of Windows 11 Build 22000 or higher by default, and it features support for running not just command-line tools but also GUI applications (X11 and Wayland).

The support for running GUI applications is enabled by what Microsoft calls the WSLg System Distro, a Linux container running the Weston compositor, XWayland, and the PulseAudio server—all packaged and distributed in the Virtual Hard Disk format.

Unlike the User Distro, which can be one of several different Linux distributions (Ubuntu, Debian, CentOS, and others), the System Distro is mounted read-only, and any changes made to it are discarded when WSL is restarted to enable seamless updating.

The Windows operating system renders GUI applications running in the WSL virtual machine using the native mstsc.exe RDP client, which communicates with FreeRDP in WSLg. Thanks to an RDP client plugin, Linux applications are integrated into the Windows Start menu, allowing users to launch them with a simple click.

Steps to Install WSL on Windows 11

With the release of Windows 11, the installation of WSL has been considerably simplified, and it now boils down to entering a single command in Windows Terminal:

  1. Press Win + X and select Windows Terminal (Admin).
  2. Type in the following command and press Enter: wsl –install
  3. Wait until all WSL components and the default Linux distribution (Ubuntu) are downloaded.

If you’d rather install a different Linux distribution, you can use the following command to specify the preferred distribution:

wsl --install -d <DistributionName>

A full list of all available distributions can be obtained using this command:

wsl --list --online

These distributions were available at the time of writing this article:

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

Once the installation is finished, you will be asked to restart your computer. After you log in to Windows again, a terminal window will automatically start to finish the installation of Ubuntu (or whichever distribution you’ve selected). Ubuntu will then prompt you to enter a username and password.

Before you install and run your first Linux GUI application, you should also install the latest graphics card driver with support for WLS to enable GPU acceleration:

You’re now ready to launch Windows Terminal and change the default shell to Ubuntu by clicking the down-arrow icon at the top and selecting the Ubuntu option. You should be looking at a familiar Ubuntu Bash prompt.

The initial greeting message displays useful system information, including the IP address of the virtual machine.

Run Your First Linux GUI Application

You can use it to install any package that’s present in the official Ubuntu repositories. For the purposes of this article, we’ll be installing Tux Racer, a simple OpenGL-based racing game featuring Tux.

Download the latest package information from all available sources:

sudo apt update

Install available updates:

sudo apt upgrade

Install the “extremetuxracer” package:

sudo apt install extremetuxracer

If you were running Ubuntu normally, you could now launch Tux Racer by typing in “extremetuxracer” in a terminal. When running Ubuntu using WSL on Windows 11, this is not possible. Instead, you need to launch Tux Racer and other GUI applications from the Windows Start menu.

You can now play the Linux version of Tux Racer on Windows 11! Because of its 3D graphics, the game does a great job of demonstrating how well 3D acceleration is working.

Are Linux GUI Applications on Windows 11 Useful?

As geeky and interesting as playing the Linux version of Tux Racer on Windows 11 is, it’s not the most useful application of Microsoft’s virtualization technology. So, are Linux GUI applications on Windows 11 actually useful?

Of course, they are! To start with, not all Linux software runs natively on Windows. Applications like Evolution, Geary, GNOME Web (Epiphany), Vocal, or Rapid Photo Downloader may not exactly have the same mass appeal as the Adobe Creative Suite or Final Cut Pro, but they do have their fans who can appreciate the option to run them on Windows.

More importantly, however, WSLg is a boon to developers because they can use it to develop and test how their applications run on Linux without leaving Windows or booting a traditional heavyweight virtual machine. Web developers can easily install Linux web browsers and use them to see how well they display their websites.

Last but not least, the latest version of WSL provides a great way to introduce someone to the wonderful world of Linux—not just the terminal side of things—helping foster a new generation of Linux developers, administrators, and regular users.

About the author

David Morelo

David Morelo is a professional content writer in the technology niche, covering everything from consumer products to emerging technologies and their cross-industry application