Sure! Since the title, rationale, and suggested hook were left blank, I’ll create a practical, step-by-step how-to blog post focused solely on installing WSL 2 (Windows Subsystem for Linux version 2). The tone will be friendly and easy to follow, perfect for a personal blog.
How to Install WSL 2 on Windows: A Practical Step-by-Step Guide
Unlock the power of Linux directly on your Windows machine with WSL 2 — here’s exactly how to get it up and running smoothly!
If you’re a developer, sysadmin, or just a tech enthusiast, running Linux natively inside Windows is a game changer. The Windows Subsystem for Linux (WSL) allows you to run a Linux environment alongside Windows without the hassle of dual-booting or using resource-heavy virtual machines.
WSL 2 is the latest and most performant version, bringing full system call compatibility via a lightweight virtual machine architecture. But installing it isn’t always straightforward if you’re new to the process. That’s where this step-by-step guide comes in!
Let me walk you through how to install WSL 2 so you can start using your favorite Linux distro on Windows today.
What You’ll Need Before Starting
- A PC running Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11.
- Administrative permissions on your PC.
- An internet connection.
Step 1: Enable the Windows Subsystem for Linux feature
First, you need to turn on WSL itself. There are two ways: via PowerShell or through the Control Panel GUI.
Using PowerShell (Recommended)
-
Open PowerShell as Administrator. You can do this by typing
PowerShell
in the Start menu, right-clicking it, and selecting Run as administrator. -
Run this command:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
Using Control Panel
- Open Control Panel > Programs > Turn Windows features on or off.
- Scroll down and check Windows Subsystem for Linux.
- Click OK and then restart your computer when prompted.
Step 2: Enable Virtual Machine Platform
WSL 2 requires virtualization features enabled so it can use the lightweight VM technology.
Run this in the same elevated PowerShell window:
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Restart your PC after executing this command to apply changes.
Step 3: Set WSL 2 as your default version
Before installing a Linux distribution, tell your system to default to WSL version 2 instead of version 1 by running:
wsl --set-default-version 2
If this command errors out because wsl
is not recognized, make sure you’ve updated Windows recently or check your path settings. Alternatively, use PowerShell with admin rights again.
Step 4: Install your preferred Linux distribution
Go to the Microsoft Store and search for Linux distros such as:
- Ubuntu
- Debian
- Fedora Remix for WSL
- Kali Linux
For example, install Ubuntu by clicking Get or Install in the Microsoft Store app.
Once installed, open the distro from your Start Menu (e.g., “Ubuntu”). It will ask you to create a UNIX username and password — this is separate from your Windows credentials but important for future terminal usage!
Step 5: Verify that WSL is working and running version 2
Back in PowerShell or Command Prompt, run:
wsl -l -v
Example output might look like:
NAME STATE VERSION
* Ubuntu Running 2
This confirms Ubuntu is installed with WSL version 2 successfully running.
Bonus Tips & Troubleshooting
Update Kernel if Prompted
Sometimes when setting WSL version to 2, Windows asks for a kernel update package. If that happens:
- Download the WSL2 Linux kernel update package.
- Run the installer.
- Then try setting default version again.
Check Virtualization Support is Enabled in BIOS/UEFI
If Virtual Machine Platform errors persist or virtualization isn’t available:
- Restart your computer and enter BIOS/UEFI settings (usually by pressing Delete/F12/Esc during boot).
- Look for an option named “Intel VT-x,” “AMD-V,” “Virtualization Technology,” or similar — make sure it’s enabled.
- Save and exit BIOS settings then try again.
Wrapping Up
And that’s how easy it is to get up and running with WSL 2! Once installed, you gain access to powerful Linux tooling like bash shell commands, native package managers like apt
, development environments like Node.js/python/gcc — all without leaving Windows.
If you have any questions or got stuck along the way, leave a comment below and I’ll help troubleshoot. Happy hacking!
Want more tips? Subscribe for weekly guides on making Windows + Linux work better together.
Example: Here’s how I’m checking my Ubuntu version inside WSL right now:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04 LTS
Release: 20.04
Codename: focal
It’s just like using a regular Ubuntu terminal — but straight from my PC!
If you'd like me to help create content with a specific title/rationale/hook next time just let me know!