Tips to Use WSL2 to Run Linux GUI Apps on Windows PC

Tips to Use WSL2 to Run Linux GUI Apps on Windows PC

Hello Geeky, so today we are focusing on How to Use WSL2 to Run Linux GUI Apps on Windows PC. So please read this tutorial carefully so you may comprehend it in a better helpful way.

Guide: How to Use WSL2 to Run Linux GUI Apps on Windows PC

With more apps being developed on Linux than ever before, Microsoft saw the need to provide developers with an easy way to create, test, and run Linux applications without leaving the Windows desktop. Windows Subsystem for Linux (WSL) was originally developed to provide an integrated Linux terminal environment in Windows without the need to set up up and manage a virtual machine (VM). But what if you want to run a Linux GUI editor or another GUI application with WSL?

Microsoft announced on April 21 that WSL now supports Linux GUI applications in Windows 10 Preview Insider Build 21364. So with writing 21364 and above, developers can run their favorite GUI editors and tools for testing and writing Linux application without the hassle of installing an X server. . In this article, I will show you how to WSL update to support GUI applications, how to install a GUI application in Ubuntu, and finally, see how Linux GUI applications integrate with the Windows UI.

Install Linux GUI applications via WSL on Windows 10

To install the Linux GUI application on Windows 10, use the following steps:

  • Open Start on Windows 10.
  • Find Ubuntu (or another distro) and click the result above to open the Linux distro.
  • Type the following command to update the distribution package and press Enter: sudo apt-get update
  • Type the following command to install the Linux GUI application on Windows 10 and press Enter: sudo apt-get install APP-NAME -y

In the command, replace the APP-NAME with the graphical application you want to install.

For example, install the gedit text editor application:

sudo apt-get install gedit -y

  • Confirm your Linux account password and press Enter (if applicable).

Once you have completed the steps, the application will be installed and registered in the Start menu, which means you can launch the app by naming the application in the Windows Subsystem for Linux (WSL) console or from in the Start menu.

The above instructions outline steps to install a simple application from known repositories, but depending on the application, the steps may vary. The good news is that the installation process is the same as any other Linux application, so you can follow the development steps to install almost any application, such as VLC, Audacity, web monitoring, and so on.

If you launch the Linux GUI application from the Windows 10 Start menu, you will find entries in the “Recently Added” menu, or you can also find them in the folder (distro name) below the Linux distro entry.

As you launch the application, the virtual machine will switch, and will run (in a few minutes) without the need to open the WSL console. You will also notice that the taskbar will display the icon with a Linux icon, indicating that you are not running a Windows 10 application.

Experience using Linux graphic software on Windows 10 is native, but it is not. The app works with all Linux interface elements for the frame, menus, and other elements, and even a shadow is around the frame, and the whole window works independently.

Install or update WSL on Windows 10

The ability to run Linux GUI applications requires Windows Subsystem for Linux 2 integration, which means you need to have the latest version of feature and sharing to install and run your applications.

If you have already installed WSL2, then you will need to update feature.

Before installing or updating WSL2, the device will need to run build 21364 or higher. If you do not, use the following steps first to register the computer in the Windows Device Manager to upgrade the program to a new character in the Dev channel, and then proceed with the steps below.

Even, as a prerequisite, you also need to install the preview driver to activate a virtual GPU (vGPU) to use OpenGL acceleration hardware before installing applications. Here are the download links:

  • NVIDIA GPU driver.
  • Intel GPU driver.
  • AMD GPU driver.

Install WSL2 on Windows 10

The following instructions will show you how to install WSL2 and distribute Ubuntu Linux to start running GUI applications. To install WSL2 components to run Linux GUI applications, use the following steps:

  • Open Start.
  • Search for the Command Prompt, right-click the top result, and select Run as administrator option.
  • Type the following command to install WSL 2 and press Enter:

wsl – install

Once you complete the steps, the required Linux components will be installed automatically, and the command will re-launch a new version of Ubuntu Linux distro. After installation, you only need to open the distro from the Start menu and proceed with the on-screen instructions to complete the setup.

Update WSL2 on Windows 10

If you have Windows Subsystem installed for Linux 2, you want to make sure that the latest updates are installed to run the GUI applications.

To update WSL2 to download GUI support for Linux apps, use the following steps:

  • Open Start.
  • Search for the Command Prompt, right-click the top result, and select Run as administrator option.
  • Click the following command to update Windows Subsystem for Linux 2 and press Enter:

wsl – updated

Faq

Guide about How to Use WSL2 to Run Linux GUI Apps on Windows PC


In this guide, we told you about the How to Use WSL2 to Run Linux GUI Apps on Windows PC; please read all steps above so that you understand How to Use WSL2 to Run Linux GUI Apps on Windows PC in case if you need any assistance from us, then contact us.

How this tutorial or guide assisting you?


So in this guide, we discuss the How to Use WSL2 to Run Linux GUI Apps on Windows PC, which undoubtedly benefits you.



Final note

I hope you like the guide How to Use WSL2 to Run Linux GUI Apps on Windows PC. In case if you have any queries regards this article/tutorial you may ask us. Also, please share your love by sharing this article with your friends and family.

Trickbugs: Get the latest Trick and Tips
Logo
Enable registration in settings - general