Kali Linux on WSL2: Complete Setup Guide 2026 (Install, Win-KeX & Config)

·

WSL2 (Windows Subsystem for Linux, version 2) runs a genuine Linux kernel inside a lightweight, managed Hyper-V virtual machine. Unlike the original WSL1 translation layer, WSL2 gives you full system-call compatibility, real network sockets, and — with a few configuration tweaks — systemd. For a security practitioner that means you can run Kali Linux and its tooling directly on a Windows laptop with none of the overhead of a full VirtualBox or VMware guest and none of the disruption of a dual-boot partition.

This guide covers three complete installation paths: the modern one-command wsl --install method, a manual path for locked-down or older Windows builds that enables each feature by hand, and a Win-KeX GUI setup plus a Docker Desktop alternative for those who want containers on the same backend. It then goes well past install: resource tuning with .wslconfig, boot and systemd control with wsl.conf, VS Code integration, USB Wi-Fi adapter passthrough for wireless testing, disk maintenance, and a troubleshooting table for the errors everyone hits.

Every command targets Kali Linux 2026.x on WSL2 under Windows 11 (Windows 10 21H2+ is also covered). Treat Kali as a loaded firearm: it ships offensive tooling, so keep it patched, keep it off untrusted networks, and only test systems you are authorised to test.

◈ Table of Contents

01 What WSL2 + Kali Is 02 Prerequisites & Requirements 03 Method 1: Quick Install 04 Method 2: Manual / Offline 05 Method 3: Win-KeX & Docker 06 First-Run & Tooling 07 Core Config: wslconfig 08 Windows Integration 09 Advanced: USB, Net, GPU 10 Maintenance & Troubleshooting 11 Sources & References
🧭

01 — What WSL2 + Kali Is (and Why It Matters)

CONTEXT

WSL2 boots a real Linux kernel that Microsoft ships and updates through the Microsoft Store package of WSL. Each distribution — Kali, Ubuntu, Debian — is a separate root filesystem stored as an ext4.vhdx virtual disk. All distros share one utility VM, so start-up is near-instant and idle RAM use is small. The trade-off versus a full VMware guest is that WSL2 uses a NAT (or mirrored) virtual network by default and does not expose host hardware such as Wi-Fi radios without extra steps — both of which this guide addresses.

🛠️

Full Kali Toolset on Windows

Install nmap, Metasploit, Burp Suite, hashcat, BloodHound, and the rest through Kali's own apt repository — no manual porting, no Cygwin, no missing dependencies.

⚡

Near-Zero Overhead

The WSL2 VM starts in a second and consumes only what its processes use. You keep Windows as your daily driver and drop into Kali in the same taskbar.

🔗

Seamless File Interop

Reach Windows files at /mnt/c from Kali and reach the Kali filesystem at \\wsl$\kali-linux from Explorer. Pipe output between the two worlds freely.

🖥️

Optional Linux Desktop

Win-KeX layers a full XFCE desktop on top of the WSL instance in window, seamless, or RDP-backed enhanced-session mode when a GUI tool needs a real display.

🧪

Disposable Lab Instances

Export a configured Kali to a tarball and re-import it in seconds. Snapshot before a messy engagement, roll back after, or clone identical instances per project.

💻

VS Code Native Dev

The VS Code WSL extension runs its server inside Kali, so you edit and debug exploit code and scripts with Linux paths and Linux Python while the editor UI stays on Windows.

WSL2 ARCHITECTURE — one shared kernel and utility VM hosts each distro's own ext4.vhdx disk.

📋

02 — Prerequisites & Requirements

BEFORE YOU START

WSL2 depends on the Windows Virtual Machine Platform and on hardware virtualization being enabled in firmware. On a modern Windows 11 machine both are usually available; on corporate or older hardware they are the two things you most often have to switch on. Confirm your build first: press Win+R, type winver, and check the version.

Requirement Minimum Recommended Notes
Windows version Win 10 21H2 (build 19044) min Windows 11 23H2+ rec Win 11 enables one-command install and mirrored networking. Win 10 2004 (19041) is the absolute floor for WSL2.
CPU virtualization VT-x / AMD-V enabled in BIOS Enabled + nested virt off unless needed Check Task Manager → Performance → CPU → "Virtualization: Enabled".
RAM 4 GB min 16 GB+ rec hashcat, BloodHound and Burp are memory-hungry. Cap WSL RAM in .wslconfig.
Disk 15 GB free 40 GB+ free (SSD) kali-linux-large alone is 15 GB+. The vhdx grows on demand and must be compacted manually.
Privileges Local admin for install Admin + firmware access Enabling the optional features and hardware virt both require administrator rights.

Run systeminfo in an admin prompt and check the "Hyper-V Requirements" block. If it says virtualization is enabled in firmware, you are clear. If it reports it disabled, reboot into BIOS/UEFI and enable Intel VT-x or AMD SVM before going further.

Third-party hypervisors and anti-cheat drivers can conflict with the Virtual Machine Platform. VMware Workstation 17+ and VirtualBox 7+ now coexist with WSL2, but some kernel-level anti-cheat and older VMware builds will break it. If WSL2 refuses to start, that conflict is the first suspect.

🚀

03 — Method 1: Quick Install (wsl --install)

RECOMMENDED PATH

On Windows 11 and current Windows 10, a single command enables every feature, fetches the WSL kernel, and installs a distro. This is the fastest and least error-prone route. Run everything below in an administrator PowerShell or Windows Terminal.

1
Install the WSL Engine
PowerShell (Admin)

This installs the WSL platform and its kernel. Passing --no-distribution installs the engine only, so you can then choose Kali explicitly rather than the default Ubuntu.

ENABLE WSL, NO DEFAULT DISTRO
PS> wsl --install --no-distribution # If WSL was already present, make sure it is current: PS> wsl --update PS> wsl --version # confirm WSL 2.x and a kernel version print

Reboot if the installer asks. After the reboot, WSL2 is the default backend on Windows 11; on Windows 10 confirm it in the next step.

2
Set WSL2 as Default and List Distros
Version Control

Force version 2 as the default so any distro you install runs on the real kernel, then list what Kali images are available online.

PS> wsl --set-default-version 2 # See every distro Microsoft/Kali publish for one-command install PS> wsl --list --online # kali-linux should appear in the NAME column
3
Install Kali Linux
Core Install

Pull and register the official Kali WSL image. The download is deliberately small — the base image ships with almost no tools so it stays lightweight; you add metapackages later.

INSTALL THE KALI DISTRO
PS> wsl --install -d kali-linux # Verify it registered and is running as version 2 PS> wsl --list --verbose # NAME STATE VERSION # * kali-linux Running 2

If wsl --list --verbose shows VERSION 1 for Kali, convert it: wsl --set-version kali-linux 2. WSL1 has no real kernel and breaks raw sockets, so many Kali tools will misbehave until you convert.

4
Create Your User and Launch
First Boot

The first launch runs Kali's setup, which prompts for a non-root username and password. That account is added to sudo. Launch Kali by name from Windows Terminal or run it from PowerShell.

PS> wsl -d kali-linux # Inside Kali, once the prompt appears: $ whoami # your new username $ id # confirm you are in the sudo group $ uname -a # shows the WSL2 kernel
You Are Done With Install When
  • wsl --list --verbose lists kali-linux at VERSION 2
  • You land at a Kali shell prompt as a sudo-capable user
  • uname -a reports a Microsoft WSL2 kernel build
🔧

04 — Method 2: Manual & Offline Install

LOCKED-DOWN / OLDER WINDOWS

Use this path when wsl --install fails — typically on older Windows 10 builds, on machines without Microsoft Store access, or where a policy blocks the automatic feature enablement. Every step the quick installer does automatically is done here by hand.

1
Enable the Two Optional Features
DISM / Admin

WSL2 needs both the WSL feature and the Virtual Machine Platform. Enable them with DISM (works everywhere) or the PowerShell equivalent, then reboot.

DISM (ADMIN COMMAND PROMPT)
> dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart > dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
OR POWERSHELL (ADMIN)
PS> Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux -All -NoRestart PS> Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform -All -NoRestart PS> Restart-Computer
2
Install the WSL2 Kernel Update
Kernel

On older Windows 10 the in-box kernel is out of date or missing. Download and run the standalone kernel update package, then pin WSL2 as the default.

  • 1
    Download the kernel MSI from https://aka.ms/wsl2kernel and run it as administrator.
  • 2
    On modern Windows, prefer wsl --update instead — it fetches the Store-based kernel automatically.
> wsl --set-default-version 2
3
Get the Kali Image (Store or Sideload)
Acquire

With the features on, install Kali from the Microsoft Store app, or sideload the appx package on machines where the Store is present but you prefer the CLI.

STORE-CONNECTED MACHINE
> wsl --install -d kali-linux
SIDELOAD A DOWNLOADED APPX (POWERSHELL ADMIN)
PS> Add-AppxPackage .\kali-linux.appxbundle # then launch it once from the Start menu to register the rootfs

Keep the downloaded appx/MSI on a USB stick as an offline install kit. On air-gapped assessment laptops that is often the only way to stand Kali up, since wsl --install needs internet to fetch images.

4
Fully Offline: Import a Root Filesystem
wsl --import

For a truly disconnected build, export an already-configured Kali from another machine to a tarball, copy it across, and import it into a chosen folder. This is also how you relocate an instance off the system drive.

ON THE SOURCE MACHINE — EXPORT
PS> wsl --export kali-linux D:\wsl-backups\kali-base.tar
ON THE TARGET MACHINE — IMPORT
PS> mkdir D:\WSL\kali PS> wsl --import kali-linux D:\WSL\kali D:\wsl-backups\kali-base.tar --version 2 PS> wsl -d kali-linux

An imported instance logs you in as root by default because import skips first-run setup. Create a normal user and set it as default (shown in Phase 07) — running every tool as root on WSL is a habit that will bite you on a real engagement.

5
Verify the Manual Build
Verify
PS> wsl --status # default distro + default version = 2 PS> wsl --list --verbose PS> wsl -d kali-linux -- uname -r # kernel string confirms WSL2
🖥️

05 — Method 3: Win-KeX Desktop & Docker Backend

GUI & CONTAINERS

The console alone runs most Kali tooling, but some — Burp Suite's UI, GUI BloodHound, Wireshark, browser-based work — want a real desktop. Win-KeX is Kali's official solution: a Kali desktop delivered over TigerVNC or, in enhanced-session mode, RDP. Separately, Docker Desktop can share the same WSL2 backend so you run containers alongside Kali without a second VM.

Win-KeX mode Command Transport Use when
Window kex --win -s VNC You want the full XFCE desktop in one resizable window
Seamless kex --sl -s VNC You want individual Kali apps floating on the Windows desktop
Enhanced Session kex --esm --ip -s RDP You want the richest, highest-fidelity desktop experience
1
Install Win-KeX
apt

Win-KeX ships as the kali-win-kex package. Update first, then install. Do this inside the Kali shell, not PowerShell.

$ sudo apt update && sudo apt full-upgrade -y $ sudo apt install -y kali-win-kex
2
Window Mode — Dedicated Kali Desktop
kex --win

Window mode opens the full XFCE desktop in a single, resizable window. The -s flag adds sound support. The first run prompts you to set a VNC password used for the local display session.

FROM INSIDE KALI
$ kex --win -s
OR STRAIGHT FROM WINDOWS
PS> wsl -d kali-linux kex --win -s
3
Seamless Mode — Kali Apps on the Windows Desktop
kex --sl

Seamless mode drops the desktop shell and floats individual Kali windows directly on your Windows desktop, so a tool like Wireshark appears as if it were a native app.

$ kex --sl -s # From Windows: PS> wsl -d kali-linux kex --sl -s

Seamless mode is the most productive default for day-to-day work: you keep the Windows taskbar and only summon the Kali GUI apps you actually need, instead of context-switching into a whole second desktop.

4
Enhanced Session Mode — RDP-Backed Desktop
kex --esm

Enhanced Session Mode (ESM) delivers the desktop over RDP for a richer, higher-fidelity experience similar to Hyper-V enhanced sessions. The --ip flag is the documented ARM workaround; keep -s for sound.

$ kex --esm --ip -s # From Windows: PS> wsl -d kali-linux kex --esm --ip -s

To shut a session down, close the Win-KeX window, or from the Kali shell run kex --stop. Use kex --help to see every flag your installed version supports.

5
Docker Desktop on the WSL2 Backend
Containers

If you also want containers, install Docker Desktop for Windows and enable its WSL2 integration. Docker then runs its engine in the shared WSL2 backend and exposes the docker CLI inside Kali — no Docker install inside Kali required.

  • 1
    Install Docker Desktop, then open Settings → General and confirm "Use the WSL 2 based engine" is ticked.
  • 2
    Open Settings → Resources → WSL Integration and toggle on kali-linux.
  • 3
    Restart Docker Desktop, then test the CLI from within Kali.
VERIFY FROM INSIDE KALI
$ docker version $ docker run --rm hello-world # Example: spin up an intentionally vulnerable lab target $ docker run --rm -it -p 80:80 vulnerables/web-dvwa
📦

06 — First-Run Configuration & Installing Tools

MAKE IT USEFUL
1
Update, Then Fix Users and Root
Baseline

Always fully update on first launch — the base image lags the repo. Then set the root password (needed for a few tools) and, if you imported and are stuck as root, create a proper user.

$ sudo apt update && sudo apt full-upgrade -y # Set a root password (optional but handy) $ sudo passwd root # If you are root after an import, create a normal user: # adduser rudra # usermod -aG sudo rudra
2
Choose a Kali Metapackage
Toolset

The WSL image is intentionally bare. Metapackages pull in curated tool bundles. Pick based on disk budget: default matches the standard Kali image, large adds far more, headless skips GUI apps (ideal for a console-only WSL box), and everything is enormous.

MetapackageApprox. sizeBest for
kali-linux-headless~4 GBConsole-only WSL; no GUI tools pulled in
kali-linux-default~9 GBThe standard Kali toolset most guides assume
kali-linux-large~15 GB+Default plus a large extra tool set
kali-tools-top10~2 GBJust the ten most-used tools for a light box
INSTALL A METAPACKAGE
# Console-first WSL box (recommended starting point) $ sudo apt install -y kali-linux-headless # Or the full standard toolset $ sudo apt install -y kali-linux-default

Do not blindly install kali-linux-everything on a laptop — it can exceed 40 GB and will balloon the ext4.vhdx. That space is not automatically returned to Windows when you later remove packages; you must compact the disk manually (Phase 10).

3
Install Individual Tools & Verify
Targeted

You can always cherry-pick. Kali packages the whole offensive catalogue, so a headless box plus a handful of named tools is often the leanest setup.

$ sudo apt install -y nmap metasploit-framework hashcat seclists bloodhound # Sanity-check the toolchain $ nmap --version $ msfconsole -q -x "version; exit" $ searchsploit -u # update the local exploit-db copy
Toolchain Is Ready When
  • nmap --version and msfconsole both launch without errors
  • searchsploit returns results from an updated local database
  • Your chosen metapackage installed with no held/broken packages

Metasploit needs its PostgreSQL database initialised once: run sudo msfdb init (systemd must be enabled — see Phase 07). Without it, db_status in msfconsole reports no connection and workspace features are unavailable.

4
Set Locale, Timezone and Shell
Polish

Fix the small things that cause noisy warnings: locale, timezone, and confirming ZSH (Kali's default shell) is active for your user.

$ sudo dpkg-reconfigure locales # select en_US.UTF-8 or your locale $ sudo dpkg-reconfigure tzdata # set your timezone $ chsh -s /usr/bin/zsh # ensure ZSH is your login shell
⚙️

07 — Core Configuration: .wslconfig & wsl.conf

THE SETTINGS THAT MATTER

Two files control almost everything. %UserProfile%\.wslconfig on the Windows side controls the whole WSL2 VM — RAM, CPUs, swap, networking mode. /etc/wsl.conf inside Kali controls that distro — systemd, default user, mount behaviour, interop. Get these right once and the rest of your setup falls into place.

1
Cap Resources with .wslconfig
Windows side

Left unbounded, WSL2 will claim a large share of RAM. Create .wslconfig in your Windows user profile to cap it. Edit from Kali via the /mnt/c path or from Windows in Notepad.

CREATE / EDIT FROM KALI
$ nano /mnt/c/Users/$USER/.wslconfig # NB: $USER here is your Windows username, not the Kali one
%UserProfile%\.wslconfig
[wsl2] memory=8GB # hard cap on RAM the VM may use processors=4 # logical CPUs exposed to WSL swap=4GB # swap file size; 0 disables swap localhostForwarding=true nestedVirtualization=true # needed for nested VMs/containers [experimental] autoMemoryReclaim=gradual # return idle RAM to Windows sparseVhd=true # keep the disk from over-growing
APPLY THE CHANGES
PS> wsl --shutdown # fully stop WSL, then relaunch Kali
KeyEffectTypical value
memoryMax RAM the utility VM can use50–75% of host RAM
processorsLogical CPUs exposed to LinuxHalf your core count
swapSwap file size (0 = off)2–4GB
networkingModenat (default) or mirroredmirrored on Win 11 22H2+
autoMemoryReclaimReturns cached RAM to Windowsgradual
2
Enable systemd and Set Default User
/etc/wsl.conf

Modern WSL supports systemd, which many Kali services (PostgreSQL for Metasploit, Docker-in-Kali, bluetooth, ssh) expect. Turn it on in /etc/wsl.conf and, if you imported as root, set your normal user as the default login.

$ sudo nano /etc/wsl.conf
/etc/wsl.conf
[boot] systemd=true [user] default=rudra # the Kali user to log in as [interop] enabled=true # run Windows .exe from Kali appendWindowsPath=true [network] generateResolvConf=true # let WSL manage /etc/resolv.conf
APPLY
PS> wsl --shutdown PS> wsl -d kali-linux $ systemctl is-system-running # expect "running" or "degraded"

After enabling systemd, manage services the normal way: sudo systemctl enable --now ssh or sudo systemctl start postgresql. Before systemd, Kali on WSL relied on service shims — those still work but native units are cleaner.

3
DNS Sanity After Config Changes
Networking

If DNS resolution breaks after editing configs (a common symptom of a stale /etc/resolv.conf), confirm the setting and let WSL regenerate it.

$ cat /etc/resolv.conf # should list a nameserver $ nslookup kali.org # confirm resolution works # If broken and you manage DNS yourself, set generateResolvConf=false # in wsl.conf, then write your own resolv.conf: $ echo "nameserver 1.1.1.1" | sudo tee /etc/resolv.conf
🔗

08 — Windows Integration: Terminal, VS Code, Files

TWO WORLDS, ONE WORKFLOW
1
Windows Terminal Profile
Terminal

Installing Kali auto-adds a Windows Terminal profile. Set it as your default or bind a hotkey so Kali is one keystroke away.

  • 1
    Open Windows Terminal → Settings (Ctrl+,) → Startup → set default profile to Kali if you like.
  • 2
    Under the Kali profile → Appearance, pick a scheme; the "Kali" preset ships with recent Terminal builds.
  • 3
    Launch a specific working directory: wsl -d kali-linux --cd ~.
2
VS Code Remote-WSL
Dev

The VS Code WSL extension runs the editor's backend inside Kali, so extensions, the integrated terminal, the debugger and Python all use the Linux environment while the window stays on Windows.

  • 1
    In Windows VS Code, install the WSL extension (publisher: Microsoft).
  • 2
    From a Kali shell, change into a project and launch the editor bound to Kali.
$ cd ~/engagements/acme $ code . # first run installs the VS Code server into Kali

Keep engagement code and notes inside the Kali filesystem (~/), not under /mnt/c. Cross-OS file access over the 9P protocol is markedly slower, and Linux permission bits are not preserved on the Windows drive.

3
File Interop Both Directions
Filesystem

Windows drives mount under /mnt inside Kali; the Kali filesystem is reachable from Explorer via the \\wsl$ UNC path. Use them to move loot, wordlists and reports between the two sides.

# From Kali: reach the Windows Downloads folder $ ls /mnt/c/Users/<WinUser>/Downloads # Open the current Kali directory in Explorer $ explorer.exe . # From Windows Explorer address bar, browse Kali's home: # \\wsl$\kali-linux\home\rudra
4
Clipboard, Browsers and Windows Binaries
Interop

With interop enabled, you can call Windows executables from Kali. This is handy for opening report artifacts or pushing text to the Windows clipboard.

# Copy command output to the Windows clipboard $ cat scope.txt | clip.exe # Open a captured HTML report in the default Windows browser $ cmd.exe /c start report.html

Interop means Kali can execute Windows binaries in your user context. Treat that as a real trust boundary: never pipe untrusted, attacker-controlled data into cmd.exe, powershell.exe or clip.exe — it crosses straight back into Windows.

🧨

09 — Advanced: USB Wi-Fi, Networking & GPU

POWER-USER
1
Pass Through a USB Wi-Fi Adapter (usbipd)
Wireless

WSL2 does not expose the host Wi-Fi radio, so wireless auditing needs an external adapter passed through with usbipd-win. Install it on Windows, then bind and attach the device to Kali.

ON WINDOWS (ADMIN)
PS> winget install --interactive --exact dorssel.usbipd-win PS> usbipd list # note the BUSID of the adapter PS> usbipd bind --busid 2-4 # one-time, per device PS> usbipd attach --wsl --busid 2-4
INSIDE KALI — CONFIRM
$ sudo apt install -y usbip $ lsusb # adapter should now be listed $ ip link # look for wlan0

Monitor mode and packet injection also require the adapter's chipset driver to be present in the WSL2 kernel. The stock Microsoft kernel omits many wireless drivers — you may need a custom-compiled WSL2 kernel for monitor mode. Confirm chipset support before relying on this for an engagement.

2
Mirrored Networking Mode
Win 11 22H2+

Default NAT gives Kali its own subnet, which complicates reverse shells and inbound listeners. Mirrored mode makes WSL share the host's network interfaces and IPs, so a listener on Kali is reachable at the Windows IP.

ADD TO %UserProfile%\.wslconfig
[wsl2] networkingMode=mirrored dnsTunneling=true firewall=true
PS> wsl --shutdown # restart to apply # Inside Kali, ip addr should now mirror the Windows adapters

In mirrored mode you can reach a Windows-hosted service from Kali via localhost and vice-versa, without the old host.docker.internal or gateway-IP gymnastics. It is the single biggest quality-of-life upgrade for running listeners on WSL.

3
GPU Acceleration for Hashcat
Cracking

WSL2 supports GPU compute passthrough. With a current NVIDIA or AMD Windows driver installed, hashcat inside Kali can use the GPU with no extra driver install inside Linux — the vendor driver is projected in.

$ hashcat -I # list OpenCL/CUDA devices WSL can see $ hashcat -b -m 22000 # benchmark WPA hashing on the GPU

Install the GPU driver on Windows, not inside Kali. Installing a Linux NVIDIA driver in WSL overwrites the projected libraries and breaks GPU access. If hashcat -I shows only the CPU, update the Windows GPU driver and run wsl --update.

🩺

10 — Maintenance & Troubleshooting

KEEP IT HEALTHY
1
Update Cadence & Snapshots
Routine

Update the distro from inside Kali and the WSL engine from Windows. Snapshot before risky work by exporting the whole instance to a tarball you can re-import.

# Inside Kali — update packages weekly $ sudo apt update && sudo apt full-upgrade -y && sudo apt autoremove -y # On Windows — keep the WSL engine and kernel current PS> wsl --update # Snapshot the whole instance before a messy engagement PS> wsl --export kali-linux D:\wsl-backups\kali-$(Get-Date -Format yyyyMMdd).tar
2
Reclaim Disk Space (Compact the vhdx)
Disk

The ext4.vhdx grows as you install tools but does not shrink when you remove them. Reclaim space by compacting it. With sparseVhd enabled (Phase 07) WSL reclaims some automatically; for a manual compaction use one of the following.

MODERN WSL — SET THE DISK SPARSE
PS> wsl --shutdown PS> wsl --manage kali-linux --set-sparse true
MANUAL COMPACTION VIA DISKPART
PS> wsl --shutdown > diskpart DISKPART> select vdisk file="C:\Users\<WinUser>\AppData\Local\Packages\...\LocalState\ext4.vhdx" DISKPART> compact vdisk DISKPART> exit

Find the exact vhdx path with (Get-ChildItem -Path $env:LOCALAPPDATA\Packages -Recurse -Filter ext4.vhdx).FullName in PowerShell. The Kali package folder name starts with KaliLinux.

3
Common Errors & Fixes
Troubleshooting

The overwhelming majority of WSL2 problems come from a handful of causes: features not enabled, virtualization off, a stale kernel, or config typos. This table maps the message you see to the fix.

Symptom / ErrorCauseFix
WslRegisterDistribution failed 0x80370102 Virtualization disabled or VM Platform off Enable VT-x/AMD-V in BIOS; run the DISM feature commands (Phase 04); reboot
Error 0x800701bc / kernel too old Missing or outdated WSL2 kernel Run wsl --update, or install the MSI from aka.ms/wsl2kernel
Kali stuck at VERSION 1 Default version was 1 at install wsl --set-version kali-linux 2 then wsl --set-default-version 2
No DNS / name resolution fails Stale or overwritten /etc/resolv.conf Set generateResolvConf=true in wsl.conf, or write your own nameserver
systemctl: "failed to connect to bus" systemd not enabled Add [boot] systemd=true to wsl.conf; wsl --shutdown
Win-KeX: black screen / no display VNC session state or missing sound flag kex --stop then relaunch with -s; run kex --help
Disk full on C: but tools removed vhdx does not auto-shrink Compact the disk (Step 2 above)
hashcat -I shows CPU only Old Windows GPU driver or WSL engine Update the Windows GPU driver + wsl --update; never install a Linux GPU driver in WSL
4
Lifecycle Command Reference
Cheat Sheet
── STATE & CONTROL ─────────────────────────────────── PS> wsl --list --verbose # distros + state + version PS> wsl --shutdown # stop all WSL activity PS> wsl --terminate kali-linux # stop just Kali PS> wsl --set-default kali-linux # make Kali the default distro ── BACKUP / MOVE / RESET ───────────────────────────── PS> wsl --export kali-linux kali.tar PS> wsl --import kali2 D:\WSL\kali2 kali.tar --version 2 PS> wsl --unregister kali-linux # DELETES the instance — irreversible

wsl --unregister permanently deletes that distro's entire filesystem, including your home directory and any engagement data. Always wsl --export first. There is no recycle bin for this.

📚

11 — Sources & References

DOCUMENTATION
Kali Linux Documentation — WSL Preparations & Install (kali.org) Kali Linux Documentation — Win-KeX GUI Modes (kali.org) Kali Linux Documentation — Metapackages (kali.org) kali-meta — Metapackage Definitions (kali.org) Microsoft Learn — Install WSL (learn.microsoft.com) Microsoft Learn — Advanced Settings (.wslconfig / wsl.conf) (learn.microsoft.com) Microsoft Learn — Connect USB Devices with usbipd (learn.microsoft.com) Microsoft Learn — WSL Networking & Mirrored Mode (learn.microsoft.com) Microsoft Learn — Enable systemd in WSL (learn.microsoft.com) usbipd-win — USB/IP for Windows (github.com/dorssel/usbipd-win)

◈ Turn This Lab Into a Skillset

A Kali WSL2 box is the launchpad — the next step is knowing what to point it at. CyberHawk Threat Intel publishes hands-on guides for the whole offensive toolchain: Nmap, Metasploit, hashcat, BloodHound and Active Directory attack paths, all built on the same lab you just stood up.

📝 More Hands-On Guides 📚 Browse Courses

◈ Stay Connected

Follow CyberHawk Threat Intel for threat intelligence, deployment guides and hands-on SOC tooling content.

🌐 Website ▶️ YouTube ▶️ YouTube (2) 𝕏 Twitter / X ♪ TikTok ✈️ Telegram
🔍 IOC Scanner 🛠️ Live Tools 📚 Courses 🚨 Threat Intel 📝 Blog 📋 SOPs

"They can't exploit you if you are the Exploit."