Run a virtual Linux distribution from Windows with Microsoft's WSL
I've had so much fun with eDEX-UI that I use it for all my CLI Linux
edex-ui A cross-platform, customizable science fiction terminal emulator with advanced monitoring & touchscreen support.
But occasionally I require a GUI for Linux. These procedures will provide A GUI Linux OS under WIndows WSL
These instructions are specifically for Debian
First, ensure WSL 2 is enabled and set as the default version. Open PowerShell as an administrator and run:
wsl --set-default-version 2
Next, install Debian from the Microsoft Store or via the command line. Use the following command to install Debian directly:
wsl --install -d Debian
This will install Debian and prompt you to restart your system. After installation, start the Debian shell and update the system:
sudo apt update && sudo apt upgrade -y
To enable a desktop environment, install tasksel, a tool for managing desktop and service components: (I chose Cinnimon)
sudo apt install tasksel -y
sudo tasksel
Use the keyboard to navigate and select a desktop environment such as GNOME or KDE, then confirm with "OK". This will install the selected GUI components.
Install xrdp, which enables remote desktop access to the GUI:
Find your Debian instance's IP address using:
ip a
On Windows, open the Remote Desktop Connection app, enter the IP address, and connect. When prompted, enter your Debian username and password to access the GUI desktop.
This method leverages WSL2's support for GUI applications through the xrdp remote desktop protocol, providing a full desktop experience.