Windows 11 has a lot of new features, but one in particular welcomed by WSL users is running graphical Linux applications as well as standard command-line programs. This used to be a limited feature for Windows Insider members, but regular Windows users can now use it.
Install Graphics Driver
To be able to run GPU-accelerated Linux GUI applications, you will have to install the latest video drivers for your hardware. Is Microsoft available? link to driver software from three major GPU manufacturers: Intel, AMD and NVIDIA.
Click the appropriate link to download your graphics driver installation program. If you don’t know what type of GPU you have, open Device Manager and click “Display adapters”. You should see your GPU name.
Once you have downloaded the installation file, run it to install the latest driver for your system. You may have to restart your computer when the installation is complete.
Update WSL version to WSL2
Assuming you already have WSL installed, you should upgrade WSL to the latest version. To do that, simply run this command in PowerShell as administrator:
To stop the update, use the following command:
Open WSL again and you should now be able to run graphical Linux applications on Windows.
Run graphical Linux applications
To run graphical applications, you can call them from the terminal like you would on any other Linux system. For example, to run the graphical version of Vim, you need to enter the following command:
This will launch Vim in a window. You can also launch Linux GUI applications from the Start Menu. They will appear in a folder with the same name as the distribution you are using. For example, with Ubuntu they will be in the “Ubuntu” folder.
Run GUI applications over the network
The best thing about X11 programs is that they are network-bootable, meaning they can run on one machine A while displaying output on machine B over the network.
To do this with WSL, SSH into a remote server with X11 forwarding enabled. On the client side, you will need to use the -X or -Y options to enable X forwarding to your machine.