HomeWindowsHow can I run Linux apps on Windows?

How can I run Linux apps on Windows?

Yes, you heard it right! You can run Linux apps on Windows like native apps on the Windows system by following this tutorial.

With the release of Windows Subsystem for Linux (WSL), you can now run Linux applications directly on your Windows system, eliminating the need for dual-boot configurations or virtual machines. WSL2, in particular, integrates a full Linux kernel into Windows, allowing you to run Linux GUI applications as if they were native Windows applications. This guide will walk you through the process of configuring WSL, installing the required components, and running Linux GUI applications on Windows.

System Requirements: Windows 10 (Version 2004 and higher) or Windows 11, and a 64-bit processor with virtualization support enabled in BIOS/UEFI.

Step 1: Enable WSL and WSL2

  1. Open PowerShell as an administrator.
  2. Run the following command to enable the WSL feature:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
  1. Next, execute the following command to enable the Virtual Machine Platform, which is required for WSL2:
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
  1. Restart the machine to complete the changes.
  2. Then set WSL2 as the default version by running:
wsl --set-default-version 2

Step 2: Install a Linux Environment

You can install various Linux distros, such as Ubuntu, Kali Linux, Debian, Fedora Remix, etc, directly from the Microsoft Store after setting up WSL. Additionally, other distributions like Manjaro and community-developed versions such as Arch Linux can also be installed through unofficial channels like GitHub.

Open the Microsoft Store and search for a Linux distribution, like Ubuntu or Kali Linux. Click Install and wait for the installation to complete. Once installed, launch the Linux environment from the Start menu.

Sometimes, you may encounter an issue like the screenshot below indicating that the WSL 2 requires an update to its kernel component. This often happens when the WSL 2 kernel is outdated or hasn’t been installed yet.

To solve this issue, update the WSL kernel by executing the following command in the PowerShell:

wsl.exe --update

Now go ahead with launching the Linux distro you installed from the Microsoft Store.

When you first launch the Linux environment, it will prompt you to create a username and password. Complete the setup by following the on-screen instructions.

Step 3: Running Linux GUI Applications

After setting up the Linux distribution, ensure that it is updated, and install the necessary GUI applications. For example, to run the Gedit application, which is exclusive to Linux distros, follow these steps:

  1. Update the Linux distribution using the appropriate update command for it:
sudo apt update && sudo apt upgrade
  1. Next, execute the installation command for the specific software you need. (For example: Gedit installation):
sudo apt install gedit
  1. After application installation, simply type the application name in the WSL terminal, and it will open as a window on your Windows desktop
gedit

Step 4: Pinning Linux GUI Application to Windows

To pin a Linux GUI application like gedit to the Windows taskbar or create a desktop icon, follow these steps:

  1. Search for the application: Open the Windows search bar and type the name of the application (e.g., gedit).
  2. Pin to Taskbar: Once you find the application in the search results, right-click on it and select Pin to Taskbar.
  1. Create a Desktop Icon: If you prefer a desktop icon, right-click on the application and select Open File Location. This will open the application’s location in Windows File Explorer.
  2. From there, right-click the application, choose Send to, and then select Desktop (create shortcut).

This will allow users to easily pin the app to the taskbar or create a desktop shortcut for quick access.

Important Features to Explore

  1. Your Windows file system is accessible from within Linux distro at /mnt/c/
  2. Your Linux distro files can be accessed from your Windows system by typing \\wsl$ into the address bar of Windows File Explorer.
  3. You can drag files between Windows and Linux applications.
  4. You can write scripts that use both Windows and Linux tools to automate tasks.

With WSL2 and integrated GUI support, running Linux applications on Windows is now easier and more efficient than ever. Whether you need to test software, develop in a Linux environment, or simply use specific Linux tools, WSL2 offers a seamless experience that makes Linux apps feel like they’re a natural part of your Windows system.

Scroll to Top