Run Ubuntu 24.04 on Windows 11 with GUI using WSL

Are you ready to unlock the potential of WSL (Windows Subsystem for Linux) and seamlessly run Ubuntu 24.04 alongside Windows 11? In this guide, we’ll walk you through the entire process, from enabling WSL to running Linux GUI applications and setting up a full Ubuntu desktop environment via XRDP. Let’s dive in!

Step 1: Install GPU Drivers

Before setting up WSL, ensure your computer’s GPU drivers are up-to-date for optimal performance, especially if you have a dedicated GPU like NVIDIA or AMD. This step is crucial for enabling GPU acceleration.

Step 2: Enable Hardware Virtualization

To use WSL, hardware virtualization must be enabled. This feature is usually on by default, but if it’s not, you’ll need to enable it in your BIOS settings.

Look for Intel VT-d, AMD-V, or SVM features and activate them. Verify the status by opening Task Manager, selecting the CPU tab, and checking if virtualization is enabled.

Step 3: Install WSL Feature

  1. Open the search bar, type “Turn Windows features on or off”, and select it.
  2. Enable the “Virtual Machine Platform” and “Windows Subsystem for Linux” options.
  3. Click Apply and reboot your computer.

Step 4: Update WSL

After rebooting, right-click on the desktop, open the terminal, and update WSL to the latest version with the following command

wsl --update

Verify the update by typing:

wsl --version

Step 5: Install Ubuntu 24.04

  1. List available Linux distributions with:
wsl --list --online

2. Install Ubuntu 24.04 LTS by typing:

wsl --install -d Ubuntu-24.04
  1. Follow the prompts to set up your username and password.

Step 6: Running Ubuntu BASH Directly

You can now run Ubuntu bash directly by searching for it in the start menu or typing “WSL” in the search bar.

Step 7: Update Ubuntu

Open Ubuntu App From the Start menu and Update your Ubuntu environment using APT.

sudo apt update && sudo apt upgrade

You can install additional packages like Neofetch or HTOP .

Step 8: Running Linux GUI Applications

Install and run Linux GUI applications:

  1. Install applications like GIMP, Blender, Kdenlive, and Krita with:
sudo apt install gimp blender kdenlive krita
  1. You can find and Open these applications from the start menu under the Ubuntu group.

Step 9: Setup Flatpak

WSLG Also supports Flatpak applications. Set up Flatpak by running:

sudo apt install flatpak 
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

Switch to the root user to install Flatpak apps:

sudo -i

You can install flatpak apps from Flathub Repository. See this link:

Note: Flatpak apps may not appear in the Windows start menu.

Step 10: Setup Ubuntu GUI

As a bonus, let’s set up the XFCE desktop environment:

  1. Update Ubuntu:
sudo apt update && sudo apt full-upgrade
  1. Install XFCE and XRDP:
sudo apt install xfce4 xfce4-goodies 
sudo apt install xrdp
  1. Configure XRDP

sudo cp /etc/xrdp/xrdp.ini /etc/xrdp/xrdp.ini.bak 

  1. Follow instructions to configure xrdp by typing the below commands
sudo sed -i 's/3389/3390/g' /etc/xrdp/xrdp.ini
sudo sed -i 's/max_bpp=32/#max_bpp=32\nmax_bpp=128/g' /etc/xrdp/xrdp.ini
sudo sed -i 's/xserverbpp=24/#xserverbpp=24\nxserverbpp=128/g' /etc/xrdp/xrdp.ini
sudo /etc/init.d/xrdp start
  1. Then configure the XRDP window manager :
sudo nano /etc/xrdp/startwm.sh

then uncomment the lines by seeing the screen shot below by adding a HASH tag at the beginning of each statement, Then at the bottom a statement to startxfce4

Then save the changes with CTRL + O and CTRL + X to exit.

  1. Open Remote Desktop Connection App on Windows, connect to localhost:3389 or 3390, and log in with your Ubuntu credentials.

Conclusion

You’ve successfully installed Ubuntu 24.04 LTS on Windows 11 using WSL! With WSLG, you can run Linux desktop and GUI applications seamlessly alongside Windows. If you have any questions or comments, feel free to leave them below.

Leave a Reply

Your email address will not be published. Required fields are marked *

Previous Post

Fedora Asahi Remix 40 is HERE For M1 / M2 Macs

Related Posts