Skip to main content

Command Palette

Search for a command to run...

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

Updated
3 min read
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


Open PowerShell or Command Prompt as Administrator and run:

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:

wsl --list

Or with version details:

wsl -l -v

Example output:

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 wsl.

Set Ubuntu as default:

wsl --set-default Ubuntu

Set another distro as default:

wsl --set-default docker-desktop

Verify:

wsl --list

(Default distro is clearly marked.)


How to Install Ubuntu on WSL

Install Ubuntu explicitly:

wsl --install -d Ubuntu

Or a specific version:

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:

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:

wsl --set-default Ubuntu

Make Kali default:

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:

wsl --unregister Ubuntu

Delete Kali:

wsl --unregister kali-linux

Verify removal:

wsl --list

How to Uninstall WSL Completely (Clean Removal)

  1. Unregister all distros:
wsl --unregister Ubuntu
wsl --unregister kali-linux
  1. Disable WSL features:
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.