To install WSL on Windows, open PowerShell as Administrator and run wsl --install. This enables Windows Subsystem for Linux and Virtual Machine Platform, installs the WSL kernel, and downloads a Linux distribution (Ubuntu by default).
Restart if prompted, create your Linux user, then verify with wsl -l -v that you’re on WSL 2. If you want a fast, reliable Linux environment on Windows without dual booting, learning how to install WSL on Windows step by step is the best starting point.
In this guide, I’ll walk you through the one command install, manual setup for older builds, post install best practices, and fixes for common problems using plain language and real world tips from production use.
What is WSL and Why Use it?
Windows Subsystem for Linux (WSL) runs a genuine Linux environment directly on Windows.

WSL 2 uses a lightweight VM with a full Linux kernel, giving you near native performance, better compatibility, Docker support, and, on modern builds, GUI app support (WSLg). It’s ideal for web development, DevOps, cloud tools, and secure SSH workflows without leaving Windows.
System Requirements and Quick Checks
- Windows 11 (recommended) or Windows 10 version 2004 (build 19041) or later with latest updates.
- Hardware virtualization enabled (Intel VT-x or AMD-V) in BIOS/UEFI.
- Administrator rights on the machine and internet access to download the Linux distribution and kernel.
Quick ways to verify readiness:
- Windows version: Press Win+R > type
winverand confirm 2004+ (Windows 10) or Windows 11. - Virtualization: Task Manager > Performance > CPU should show “Virtualization: Enabled.” If not, enable it in BIOS/UEFI.
- Admin PowerShell: Right click Start > Windows Terminal (Admin) or PowerShell (Admin).
Install WSL on Windows (Fast Method) – Step by Step

1. Open PowerShell as Administrator
Right click the Start button and choose Windows Terminal (Admin) or PowerShell (Admin). You’ll run a single command that sets up everything for WSL 2 and installs Ubuntu by default.
2. Run the one command installer
wsl --install
What this does:-
- Enables the Windows Subsystem for Linux and Virtual Machine Platform features.
- Installs the latest WSL kernel (Store version on modern builds).
- Downloads and installs the default Linux distribution (usually Ubuntu LTS).
Restart your PC if prompted. On first launch, WSL will ask you to create a Linux username and password.
3. Choose or change your Linux distro
If you want a different distribution (e.g., Ubuntu 22.04, Debian, Kali, openSUSE), list available options and install a specific one:
wsl -l -o
wsl --install -d Ubuntu-22.04
wsl --set-default Ubuntu-22.04
4. Create your Linux user and update packages
On first launch, WSL asks for a UNIX username and password. Then, update packages to ensure a secure, current environment:
sudo apt update && sudo apt -y upgrade
sudo apt install -y build-essential git curl
At this point you have a fully working WSL 2 environment on Windows.
Alternative: Manual Installation (Windows 10/Older Builds)
Enable WSL and Virtual Machine Platform features
If wsl --install isn’t available, enable the features manually in PowerShell (Admin):
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Install the Linux kernel update (if prompted)
Older Windows 10 builds require the WSL 2 kernel package. If your system prompts for it, follow the link provided or run:
wsl --update
Set WSL 2 as default and install a distro
Make WSL 2 your default version and install a distribution of your choice:
wsl --set-default-version 2
wsl -l -o
wsl --install -d Ubuntu-22.04
If the Store is blocked, you can download a .appx package from Microsoft and install it offline, then run the distro to finalize setup.
Verify, Update, and Manage WSL
Check version and status
wsl -l -v
wsl --status
You should see your distro listed with “Version 2.” If it shows “1,” upgrade it:
wsl --set-version <DistroName> 2
Update WSL and the kernel
wsl --update
wsl --shutdown
Shutdown restarts the lightweight VM so updates take effect. Keep both Windows and your Linux packages updated for security and performance.
Post Install Essentials and Best Practices
File system paths and backups
Access Windows files from Linux at /mnt/c, and Linux files from Windows via \\wsl$. For performance, keep project files inside your Linux home (e.g., ~/projects) rather than on the Windows side. Use Git inside WSL to avoid line ending and permission issues.
Using SSH to manage servers
WSL is excellent for SSH-based workflows. Generate keys, then connect to your VPS or dedicated server:
ssh-keygen -t ed25519 -C "your_email@example.com"
ssh-copy-id user@server-ip
ssh user@server-ip
If you host with YouStable, WSL gives you a consistent Linux toolchain on Windows to manage your servers over SSH, deploy web apps, and automate tasks with Ansible or Docker Compose, all from your local machine.
GPU, Docker, and dev tools
- Docker: Install Docker Desktop and enable “Use the WSL 2 based engine,” or install Docker Engine inside WSL for a pure Linux feel.
- GUI apps: On Windows 11 (and recent WSL), Linux GUI apps run out of the box with WSLg.
- VS Code: Install VS Code on Windows and the “Remote – WSL” extension for seamless editing inside Linux.
Control WSL resources (.wslconfig)
Limit CPU, RAM, and swap usage by creating %UserProfile%\.wslconfig and then running wsl --shutdown:
[wsl2]
memory=6GB
processors=4
swap=2GB
localhostForwarding=true
Troubleshooting Common Errors
Virtualization disabled
If you see errors about virtualization or can’t set WSL 2, enable Intel VT-x/AMD-V in BIOS/UEFI. Also ensure the “Virtual Machine Platform” feature is on and that other hypervisors (e.g., third party) aren’t conflicting.
Microsoft Store blocked or offline install
Use wsl --install -d <Distro> from PowerShell. In restricted environments, download the distro package from Microsoft and install it offline. Then initialize the distro by launching it once.
Permission and network issues
- Run PowerShell as Administrator for feature changes.
- Temporarily disable security software if it blocks the WSL kernel update.
- For DNS/network errors inside WSL, try
wsl --shutdownor reset the network stack, then relaunch.
Reset or uninstall WSL
wsl --shutdown
wsl --unregister <DistroName> # removes a distro
wsl --uninstall # removes WSL (Store build)
Unregistering a distro deletes its data, so always back up important projects and databases first.
WSL 1 vs WSL 2: Which Should You Use?
- Compatibility: WSL 2 runs a real Linux kernel; Docker and most tools work better.
- Performance: WSL 2 is faster for file I/O inside Linux; WSL 1 can be faster when reading Windows files.
- Networking: WSL 2 uses a lightweight VM with its own IP by default; port forwarding to localhost works with modern WSL.
- Use WSL 1 only if your environment forbids virtualization or you need specific legacy behavior. Otherwise, choose WSL 2.
Real World Use Cases (From a Hosting Perspective)
- Local WordPress dev: Spin up LAMP/LEMP stacks in WSL, test, then deploy to your VPS.
- CI/CD pipelines: Use Git, Node.js, Python, and Docker in WSL to build and ship from Windows.
- Server admin: SSH into YouStable servers, manage Nginx/Apache, run backups, and automate with Bash.
- Cloud tooling: Use AWS CLI, Azure CLI, kubectl, and Terraform natively in Linux without leaving Windows.
If you’re moving from local WSL projects to production, YouStable’s SSD VPS and Dedicated Servers offer reliable performance, easy scaling, and 24×7 support making deployment from WSL straightforward and predictable.
FAQ’s
1. Is WSL free, and does it work on Windows Home?
Yes, WSL is free and fully supported on Windows 10 Home (version 2004+) and all editions of Windows 11. You don’t need Hyper‑V; WSL 2 uses the “Virtual Machine Platform” feature, which works on Home editions.
2. How do I check if I’m using WSL 2?
Run wsl -l -v in PowerShell or a Windows terminal. The output shows each distro’s version. To make WSL 2 the default for new installs, use wsl --set-default-version 2. To convert an existing distro, run wsl --set-version <DistroName> 2.
3. Can I move a WSL distro to another drive?
Yes. Export and re-import it. For example: wsl --export Ubuntu ubuntu.tar, then wsl --unregister Ubuntu, and wsl --import Ubuntu D:\WSL\Ubuntu ubuntu.tar --version 2. This places the distro on D: while preserving its data from the export.
4. What’s the difference between WSL and a full Linux VM?
WSL 2 is a managed, lightweight VM tightly integrated with Windows: super fast startup, seamless file access, and easy networking. A traditional VM (e.g., in VirtualBox) offers full isolation and custom VM settings but with more overhead and less integration.
5. Do I need Docker Desktop to use containers with WSL?
No. You can install Docker Desktop and use its WSL 2 backend for the best Windows integration. Or, install Docker Engine directly inside your WSL distro for a pure Linux workflow. Both options work well with modern WSL 2.
With these steps and best practices, you now know exactly how to install WSL on Windows and optimize it for real development and server management. Set it up once, and you’ll have a fast, secure Linux toolbox right inside Windows ready to build, test, and deploy to YouStable or any cloud environment.