Install Ubuntu on WSL with GUI – A Complete Guide
Running Ubuntu on Windows has never been easier thanks to Windows Subsystem for Linux (WSL). With WSL 2, you can install Ubuntu, run Linux commands natively, and even launch a full Linux desktop with a GUI - all without needing a virtual machine or dual-boot setup.
In this step-by-step guide, I’ll show you how to install Ubuntu on WSL with GUI and set up a smooth desktop experience on Windows.
Why Use Ubuntu on WSL?
Here are some benefits of running Ubuntu on WSL:
- ✅ No dual-boot required – Run Ubuntu side by side with Windows.
- ✅ Better performance than VirtualBox or VMware.
- ✅ Seamless workflow – use Linux commands with Windows apps.
- ✅ Supports GUI apps with desktop environments.
- ✅ Perfect for developers, students, and Linux enthusiasts.
Step 1: Enable WSL and Virtualization on Windows
First, make sure WSL and Virtualization are enabled.
- Open PowerShell as Administrator and run:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestartStep 2: Install Ubuntu from the Microsoft Store
- Open the Microsoft Store.
- Search for Ubuntu (you can pick Ubuntu 20.04 LTS, 22.04 LTS, or the latest version).
- Click Install.
- Launch Ubuntu for the first time and set up your username and password.
Step 3: Update & Upgrade Ubuntu
After installation, update your packages:
sudo apt update && sudo apt upgrade -yStep 4: Install a GUI for Ubuntu
To run Ubuntu with a desktop environment on WSL, you’ll need a GUI. XFCE is lightweight and well-suited for this setup.
Install XFCE and XRDP:
sudo apt install xfce4 xfce4-goodies -ysudo apt install xrdp -yStart XRDP:
sudo service xrdp startStep 5: Connect to Ubuntu GUI
Now connect to your Ubuntu desktop:
- Open Remote Desktop Connection on Windows (
mstsc). - Enter:
localhost:3389 - Log in with your Ubuntu username and password.
🎉 You now have Ubuntu with a full GUI running on WSL.
Step 6: (Optional) Install Extra Software
You can install additional software for development or daily use:
- Build tools:sudo apt install build-essential -y
- Git:sudo apt install git -y
- Common desktop apps (e.g., Firefox, Gedit):sudo apt install firefox gedit -y
Common Issues & Fixes
- ❌ Black screen on RDP → Restart XRDP:sudo service xrdp restart
- ❌ WSL not starting → Ensure virtualization is enabled in BIOS.
- ❌ Slow performance → Adjust
.wslconfigto allocate more RAM/CPU.
FAQs – Install Ubuntu on WSL with GUI
Q1: Do I need Windows 11 for Ubuntu WSL with GUI?
➡️ No. You can run it on Windows 10 (2004 and later) if you have WSL 2.
Q2: Can I use GNOME instead of XFCE?
➡️ Yes, but XFCE is lighter and works more smoothly on WSL.
Q3: Is this safe for my Windows system?
➡️ Yes. WSL keeps Ubuntu isolated from Windows.
Q4: Can I run Linux GUI apps without Remote Desktop?
➡️ Yes. Windows 11 supports WSLg, which allows Linux GUI apps to run natively.
Q5: Do I still need VMware or VirtualBox?
➡️ Not for most cases. WSL is faster and integrates better with Windows.
Q6: Will updates break my GUI setup?
➡️ Rarely. If they do, just restart XRDP or reinstall the desktop environment.
Conclusion
Installing Ubuntu on WSL with GUI is the best way to experience Linux alongside Windows without the hassle of dual-booting or using heavy virtual machines. With this setup, you can:
- Run Linux commands and tools directly inside Windows.
- Launch a lightweight Ubuntu desktop via Remote Desktop.
- Enjoy smooth performance and cross-platform flexibility.
👉 For official documentation, check out: Ubuntu on WSL.