Getting Started with WSL on Windows: Install, Manage, and Remove Linux Distros

#WSL#Windows#Linux#Devops#Ubuntu
Getting Started with WSL on Windows: Install, Manage, and Remove Linux Distros

If you’re a Windows user who wants a real Linux environment without heavy virtual machines, WSL (Windows Subsystem for Linux) is the best solution.
In this post, I’ll walk through what WSL is, how to install it, manage multiple Linux distros, and cleanly uninstall everything when needed.


What is WSL?

WSL lets you run Linux distributions natively on Windows.
It uses lightweight virtualization (WSL 2) instead of a full VM, which makes it:

  • Fast to install

  • Fast to boot

  • Deeply integrated with Windows

You can use it for:

  • Development

  • Docker

  • DevOps tooling

  • Learning Linux


How to Install WSL (Recommended Way)

Open PowerShell or Command Prompt as Administrator and run:

plaintext
wsl --install

This single command will:

  • Enable WSL

  • Enable required virtualization features

  • Install WSL 2

  • Install Ubuntu by default

Restart your system when prompted.


How to Check Installed Linux Distributions

To see all installed WSL distros:

plaintext
wsl --list

Or with version details:

plaintext
wsl -l -v

Example output:

plaintext
Ubuntu           Running   2
docker-desktop   Running   2

How to Set a Default WSL Distribution

The default distro is the one that starts when you run

Code
wsl
.

Set Ubuntu as default:

plaintext
wsl --set-default Ubuntu

Set another distro as default:

plaintext
wsl --set-default docker-desktop

Verify:

plaintext
wsl --list

(Default distro is clearly marked.)


How to Install Ubuntu on WSL

Install Ubuntu explicitly:

plaintext
wsl --install -d Ubuntu

Or a specific version:

plaintext
wsl --install -d Ubuntu-22.04

After installation:

  • Launch Ubuntu from Start Menu

  • Create a Linux username and password


How to Install Kali Linux on WSL

To install Kali Linux:

plaintext
wsl --install -d kali-linux

Then launch Kali Linux from the Start Menu and complete setup.

You can now run multiple Linux distros side by side.


How to Switch Default Between Ubuntu and Kali

Make Ubuntu default:

plaintext
wsl --set-default Ubuntu

Make Kali default:

plaintext
wsl --set-default kali-linux

This does not delete any distro — it only changes which one starts by default.


How to Delete a Linux Distribution (Permanently)

⚠️ This removes all data inside that distro.

Delete Ubuntu:

plaintext
wsl --unregister Ubuntu

Delete Kali:

plaintext
wsl --unregister kali-linux

Verify removal:

plaintext
wsl --list

How to Uninstall WSL Completely (Clean Removal)

  1. Unregister all distros:
plaintext
wsl --unregister Ubuntu
wsl --unregister kali-linux
  1. Disable WSL features:
plaintext
dism.exe /online /disable-feature /featurename:Microsoft-Windows-Subsystem-Linux /norestart
dism.exe /online /disable-feature /featurename:VirtualMachinePlatform /norestart
  1. Restart your system

WSL is now fully removed.


Final Thoughts

WSL gives you:

  • Linux power without VM overhead

  • Multiple distros on one machine

  • Seamless Windows + Linux workflow

Whether you’re a beginner or a developer, WSL is one of the best tools on Windows today.