Installing Kali Linux on Windows through WSL2 gives you a full Linux security toolkit without leaving your familiar environment. This approach is ideal for security professionals and learners who want network services, packet manipulation, and command-line tooling directly on Windows.
Below is a quick reference table that outlines the core phases, what each step achieves, and the commands or checks you need to complete the installation successfully.
| Phase | Key Action | Command or Setting | Verification |
|---|---|---|---|
| Enable WSL | Turn on the WSL optional feature | dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart | Command completes without error |
| Install Virtual Machine Platform | Enable VM platform for WSL2 | dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart | Reboot required after this step |
| Set WSL2 as default | Configure new distros to use WSL2 | wsl --set-default-version 2 | Default version shows as 2 |
| Install Kali from Store | Download Kali Linux WSL app | Microsoft Store link or wsl --install -d kali-linux | App appears in Start menu |
| First launch and setup | Create user and sync files | Username/password during first run | kali@DESKTOP:~$ prompt appears |
Enable Windows Subsystem for Linux on Your Machine
The Windows Subsystem for Linux is the foundation that lets Kali Linux run as an app on Windows 10 and 11. Before you install any Linux distribution, you need to enable this component and prepare your system for WSL2, which delivers near-native performance and full system call compatibility.
Open PowerShell as Administrator and run the command that turns on the WSL feature. This step registers the necessary Windows services and kernel extensions. If you skip the optional step to enable the Virtual Machine Platform, WSL2 will not function because it relies on a lightweight virtual machine architecture.
After enabling both features, set WSL2 as the default version. This ensures that every new Linux distribution you install will use the faster WSL2 backend instead of the legacy WSL1 runtime, which lacks complete kernel support required by many security tools.
Install Kali Linux from the Microsoft Store
Kali Linux is available officially in the Microsoft Store, making installation straightforward and keeping your system up to date with the latest security tools. Using the store app also provides a familiar update mechanism so you always have the latest penetration testing utilities without manual downloads.
You can install Kali directly from the store by searching for "Kali Linux," or you can use a single PowerShell command that pulls the distribution silently in the background. The command wsl --install -d kali-linux automates enabling features, setting WSL2 as default, and launching the install in one flow for supported systems.
During the download and extraction phase, ensure you have a stable internet connection and enough disk space on the drive where Windows is installed. Large package indexes and toolsets mean the initial install can take several minutes, but once it finishes, you are ready to launch Kali for the first time.
Configure User Accounts and File Permissions
When you first launch Kali Linux on WSL, the installer prompts you to create a standard user account. This username becomes the default identity for running commands, and your home directory is mapped under the Windows filesystem so you can persist scripts and configurations.
It is important to avoid running daily commands as root unless absolutely necessary. Use sudo for administrative tasks and keep your main account as a limited user to reduce risk if you accidentally run a destructive command. You can create additional users and manage groups with standard Linux tools like useradd and usermod, which helps you simulate real-world security testing scenarios.
File permissions between Windows and WSL are handled automatically, but you should still be cautious when editing system files or writing to mount points such as /mnt/c. Use appropriate file ownership and access rights, and prefer working within your home directory for persistent projects to avoid accidental corruption of Windows data.
Update and Harden Your Kali Installation
Right after the first launch, run an update and upgrade to synchronize your package index with the latest releases. Use apt update to refresh repository metadata and apt upgrade to apply security patches and minor improvements to installed tools.
For a more stable environment, consider performing a full distribution upgrade with apt full-upgrade, which can install new dependencies and remove obsolete packages. Keeping the system current reduces compatibility issues when you later install custom tools or integrate with external networks.
You may also want to configure basic hardening steps such as enabling automatic security updates, reviewing default firewall rules, and ensuring that only required network interfaces are exposed. These measures help maintain a predictable baseline while you focus on learning offensive and defensive security techniques.
Key Takeaways for Running Kali Linux on Windows
- Enable the Windows Subsystem for Linux and Virtual Machine Platform before installing.
- Set WSL2 as the default version to ensure performance and kernel compatibility.
- Install Kali Linux from the Microsoft Store or via wsl --install -d kali-linux.
- Create a non-root user and rely on sudo for administrative tasks.
- Keep your system updated with apt update and apt full-upgrade on a regular schedule.
- Back up important configurations and scripts in a separate repository or cloud location.
- Understand the limitations of WSL2 for hardware-dependent and high-speed network tasks.
FAQ
Reader questions
Can I run graphical Kali Linux tools on Windows after installing via WSL?
Yes, you can run graphical tools by installing a third-party X server on Windows or enabling WSLg if your Windows build supports it, which provides native Wayland display capabilities for Kali applications.
Will using Kali Linux on WSL2 be slow when scanning large networks?
WSL2 is fast enough for most network scans, but heavy traffic generation may be limited by virtualized networking. For maximum performance, use dedicated hardware or a cloud instance, and consider WSL2 for development and testing rather than high-speed exploits.
How do I back up my Kali Linux files installed on Windows?
Back up your Windows home directory under \\wsl$\\kali-linux\\home\\yourname, or export critical configurations and scripts to a separate git repository or cloud storage to protect your work and custom scripts.
Can I install additional wireless drivers and hardware tools on Kali Linux in WSL2?
Many wireless and hardware-dependent tools will not function because WSL2 does not provide direct access to USB devices or specialized hardware. Use physical hardware or a virtual machine with PCI passthrough for those specific tasks.