WSL lets you run a Linux environment directly on Windows without a virtual machine or dual boot. Perfect for developers who need Linux tools on Windows.
- Run Linux on Windows β No separate machine or VM needed.
- Fast Performance β Near-native speed using the Windows kernel.
- Linux Tools β Access Bash, Git, Python, and more.
- GUI Support β Run Linux GUI apps with GPU acceleration (WSL 2).
- File Sharing β Seamlessly access files between Windows and Linux.
- Docker & AI β Ideal for Docker, TensorFlow, and other tools.
- Compatibility layer for Linux system calls.
- Faster file access for Windows files.
- Limited Linux feature support.
- Real Linux kernel in a lightweight VM.
- Full Linux system call compatibility (supports Docker, GPU, etc.).
- Slightly slower file access to Windows folders.
Run this in PowerShell (Admin) or CMD:
wsl --install
This installs WSL 2 with Ubuntu as the default distro.
wsl --list --online
To install a specific distro (e.g., Debian or Kali Linux):
wsl --install -d <DistroName>
Ensure your distro uses WSL 2:
wsl --set-version <DistroName> 2
Simply type:
wsl
To install a desktop GUI like GNOME or XFCE4, follow these steps:
- Update your package list:
sudo apt update
- Install GNOME Desktop:
sudo apt install ubuntu-gnome-desktop -y
- Update your package list:
sudo apt update
- Install XFCE4 and LightDM:
sudo apt install xfce4 lightdm -y
- During installation, you may be prompted to select a display manager. Choose
lightdm
.
To start the GUI, run:
sudo service lightdm start
To access the GUI using Remote Desktop Connection:
- Install an RDP server in your WSL environment:
sudo apt install xrdp -y
- Start the RDP server:
sudo service xrdp start
- Find your WSL IP address:
hostname -I
- Open the Remote Desktop Connection app on Windows and enter the IP address from the previous step.
- Log in using your WSL username and password.
To remove WSL completely:
wsl --unregister <DistroName>
Example:
wsl --unregister Ubuntu
- π» Web Development β Run Linux-based servers, databases, and tools.
- π AI & Machine Learning β Use TensorFlow, PyTorch, Jupyter Notebook.
- π³ Docker & Containers β Fully supported on WSL 2.
- βοΈ System Administration β Manage servers and run Linux scripts.