How one can Run Linux GUI Apps With WSL2 on Home windows

You can now run Linux graphical apps on Windows with the latest version of Windows Subsystem for Linux (WSL2).

Windows 11 has many new features, but one is especially welcome for users of the Windows subsystem for Linux or WSL. WSL users can now run Linux graphical apps as well as standard command line utilities. This used to be a feature that was limited to Windows Insider members, but ordinary Windows users can now benefit from this feature as well.

If you've just upgraded to Windows 11 and are dying to try this out, read on.

Install graphics driver

In order to run GPU-accelerated Linux GUI apps, you need to install the latest graphics drivers for your hardware. Microsoft has created helpful links to driver software for the three major GPU manufacturers: Intel, AMD, and NVIDIA.

Download: Graphics driver for WSL2

Follow the appropriate link to download your graphics driver installer. If you don't know what type of video hardware you have, open Device Manager in Control Panel and click Graphics Cards. This should show what type of graphics card you have.

After you've downloaded the executable file, run it to install the latest drivers for your system. You may need to restart your computer when it finishes.

Update the WSL version to WSL2

Assuming you already have a working WSL installation, all you need to do is make sure you are using the latest version. To do this, simply run this command in a PowerShell window as an administrator:

MAKEUSEOF VIDEO OF THE DAYwsl –update

To force a restart use this command:

wsl –shutdown

Open WSL again and you can now run Linux graphical apps on Windows.

Running graphical apps

To run graphical apps, just like any other Linux system, you can access them from the command line. For example, to run the graphical version of Vim, enter this in the shell:

gvim

This will launch Vim in a window. You can also start Linux GUI apps from the Start menu. They will appear in a folder with the name of the distribution you are using. In Ubuntu, for example, they are in the "Ubuntu" folder.

Run GUI apps over the network

The great thing about X11 programs is that they are network transparent, which means they can run on one computer while viewing their output on another computer over a network.

To do this using WSL, establish an SSH connection to a remote server that has X11 forwarding enabled. On the client side, you need the -X or -Y Options to enable X forwarding to your device.

Now you can run Linux GUI apps in Windows

The ability to run Linux GUI apps in Windows is a welcome addition and makes the Windows subsystem for Linux much more user-friendly as you are no longer limited to just text-based apps.

If you want to run not just a single app but an entire Linux desktop on Windows, you can too.

How to run a Linux desktop with the Windows Subsystem for Linux

The Windows subsystem for Linux does not come with a desktop. How to install a WSL desktop environment such as GNOME or LXDE on Windows.

Continue reading

About the author

David Delony
(66 published articles)

David is a freelance writer based in the Pacific Northwest but originally from the Bay Area. He has been passionate about technology since childhood. David's interests include reading, watching quality TV shows and movies, retro games, and collecting records.

More
By David Delony

Subscribe to our newsletter

Subscribe to our newsletter for tech tips, reviews, free e-books, and exclusive deals!

Click here to subscribe

Leave a Reply

Your email address will not be published. Required fields are marked *