Run Linux Desktop Apps on Windows with WSL
In this article
Running Linux desktop applications on Windows is possible using the Windows Subsystem for Linux (WSL). This allows you to access powerful Linux tools and environments directly from Windows without dual-booting or running a full virtual machine. To get started, you'll need Windows 10 or 11 and access to the Microsoft Store. Below is a step-by-step guide to help you set up and run Linux desktop apps on your Windows system.
What You'll Need
- Windows 10 (version 1903 or later) or Windows 11
- Internet access to download Linux distributions from the Microsoft Store
- At least 4 GB of free disk space
- Basic familiarity with the command line
Step-by-Step
- Enable WSL and Virtual Machine Platform
Open PowerShell as an administrator and run the following commands:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform
Restart your computer if prompted. - Install a Linux Distribution
Go to the Microsoft Store and search for a Linux distribution, such as Ubuntu or Debian. Click Get to install it. After installation, launch the application for the first time to complete setup. - Set Up Your Linux Environment
When you first launch the Linux app, you'll be asked to create a username and password. Choose a strong password and remember it, as it will be used for administrative tasks. - Install GUI Support
Open the terminal and update your package list withsudo apt update. Then install a window manager or desktop environment like XFCE withsudo apt install xfce4. Once installed, you'll need to configure a display server. - Enable WSLg (for Windows 10 21H2 or later)
WSLg allows Linux GUI apps to display on Windows without extra software. If you're using Windows 11 or a recent version of Windows 10, this is enabled by default. For older Windows 10 builds, you may need to update your system before GUI apps work. - Launch the Linux Desktop App
Start XFCE or another desktop environment by runningstartxfce4in the terminal. A new window should appear with the Linux desktop interface. - Install and Run Linux Apps
Use the package manager to install Linux desktop applications. For example, to install GIMP, runsudo apt install gimp. The app will then be available from the Linux desktop or via the terminal. - Access Linux Apps from Windows
Some Linux apps can be accessed from the Windows Start menu after installation. You can also pin them for easy access.
Common Mistakes
- Not enabling WSL before installing a Linux distribution
- Skipping the GUI setup step, which is essential for running desktop apps
- Using an outdated Windows version that doesn't support WSLg
- Forgetting to update the Linux package list before installing apps
Tips
- Use
Ctrl + Alt + Tto open a terminal window in XFCE - Install
lxappearanceto customize the look of your Linux desktop - Use
sudo apt autoremoveto clean up unused packages and free up space - Keep your Linux system updated with
sudo apt upgradeandsudo apt dist-upgrade
Troubleshooting
If you encounter issues, try the following steps:
- WSL not working
Ensure WSL is enabled in the Windows Features dialog. If it's not working after enabling, try reinstalling or enabling again. - GUI apps not launching
Make sure WSLg is enabled and functioning. If not, update Windows and the Linux distribution. - App crashes or freezes
Check for updates to the app and your Linux distribution. If issues persist, try reinstalling the app or resetting the Linux environment. - No network access
Ensure that the Linux distribution is configured to use the same network as Windows. You can test connectivity withping google.com.
Frequently Asked Questions
Can I use any Linux app on Windows with WSL?
Most Linux apps that run on a desktop can be used with WSL, provided a GUI is enabled. Some apps may not work properly or may require additional configuration.
Do I need a separate license for Linux apps?
Most Linux apps are open source and free to use. Some commercial apps may be available through Linux package managers or repositories.
Can I run multiple Linux distros on Windows?
Yes, you can install and run multiple Linux distributions from the Microsoft Store. Each one will have its own home directory and settings.
Is WSL compatible with all Windows versions?
WSL is supported on Windows 10 version 1903 and later, and Windows 11. Older versions may require additional setup or may not support GUI apps.
Can I use WSL apps on a remote desktop session?
WSL and GUI apps are typically only available on the local machine. Remote desktop sessions generally do not support WSL or Linux desktop apps.