If you’ve ever wished to run Linux commands, scripts, or tools directly within Windows — without juggling dual-boot setups or virtual machines — the Windows Subsystem for Linux (WSL) is your dream come true.
In this guide, we’ll walk you through how to use WSL in Windows 11, step by step. You’ll learn what WSL is, how to install it, configure it, and use it effectively — even if you’re completely new to Linux.
By the end, you’ll be confidently switching between Linux and Windows like a pro.
What Is WSL in Windows 11?
WSL (Windows Subsystem for Linux) is a compatibility layer that allows you to run a full Linux environment directly inside Windows, without the need for dual booting or virtual machines.
It’s like having two operating systems in one — Windows for your everyday tasks, and Linux for development, scripting, or learning command-line operations.
Microsoft introduced WSL to bridge the gap between Windows developers and Linux tools. With Windows 11, WSL 2 brings massive performance improvements and better compatibility.
2. Why Use WSL Instead of Dual Boot or Virtual Machines?
Traditionally, developers had to choose between running Linux in a dual-boot setup or using a virtual machine. Both come with drawbacks — they take time, space, and resources.
WSL changes that completely.
| Method | Setup Difficulty | Performance | Integration with Windows | Disk Usage |
|---|---|---|---|---|
| Dual Boot | Complex | Native | Low | High |
| Virtual Machine | Medium | Medium | Limited | High |
| WSL | Easy | Near-Native | Seamless | Low |
In short: WSL offers the best of both worlds — the power of Linux, combined with the convenience of Windows.
3. Key Benefits of Using WSL
Here’s why developers and power users love WSL on Windows 11:
-
💻 Run Linux tools natively inside Windows.
-
⚡ Fast performance with WSL 2’s full Linux kernel.
-
🔄 Seamless file access between Windows and Linux.
-
🧑💻 Perfect for developers — run Docker, Git, Node.js, Python, etc.
-
🪶 Lightweight — no need for heavy VMs.
-
🔐 Secure — runs in a sandboxed environment.
-
🧩 Easy integration with VS Code and other IDEs.
4. System Requirements for WSL in Windows 11
Before you start, make sure your system meets these minimum requirements:
| Requirement | Details |
|---|---|
| OS Version | Windows 11 (Build 22000 or later) |
| Architecture | x64 or ARM64 |
| Virtualization | Enabled in BIOS |
| Storage | At least 5 GB free space |
| Internet | Required to download Linux distributions |
Tip: To check your Windows build, press Win + R, type winver, and hit Enter.
5. How to Check If WSL Is Already Installed
Before installing, it’s smart to check if WSL is already set up on your machine.
Steps:
-
Open Command Prompt or PowerShell as Administrator.
-
Type the following command:
-
If you see a list of Linux distributions, WSL is installed.
-
If not, you’ll need to install it manually — we’ll cover that next.
6. How to Install WSL in Windows 11 (Step-by-Step)
Microsoft made installing WSL incredibly simple in Windows 11 — it takes just one command.
Step 1: Open PowerShell as Administrator
-
Press
Win + Xand select Windows Terminal (Admin).
Step 2: Run the Installation Command
Type:
This command will:
-
Enable required features (like Virtual Machine Platform)
-
Download the latest Linux kernel
-
Install Ubuntu (by default)
-
Set WSL 2 as the default version
Step 3: Restart Your Computer
Once installation completes, restart your PC to apply changes.
Step 4: Launch Linux
After reboot, open Start Menu → Ubuntu (or your chosen distro). It will prompt you to set a username and password.
Congratulations — you now have Linux running inside Windows!
7. Choosing Between WSL 1 and WSL 2
There are two versions of WSL — WSL 1 and WSL 2.
Here’s how they differ:
| Feature | WSL 1 | WSL 2 |
|---|---|---|
| Linux Kernel | Translated | Full Linux kernel |
| Performance | Slower for I/O | Much faster |
| Compatibility | Limited | Full system call compatibility |
| Disk Size | Smaller | Slightly larger |
| Best For | Basic use | Development, Docker, etc. |
👉 Recommendation: Always use WSL 2 unless you have a specific reason not to.
8. How to Set WSL 2 as Default
To make sure all new installations use WSL 2, run this command:
You can also check the version of your installed distros with:
If a distro is still on WSL 1, upgrade it using:
Example:
9. How to Install a Linux Distribution on WSL
While Ubuntu installs by default, you can choose other distros like Debian, Fedora, or Kali Linux.
To view available distributions:
To install one:
Example:
Once done, open it from the Start Menu and set up your username.
10. How to Open and Use WSL in Windows 11
You can launch WSL in multiple ways:
Option 1: Using the Start Menu
-
Type your distro’s name (e.g., “Ubuntu”) and hit Enter.
Option 2: From Command Prompt or PowerShell
Option 3: Run Specific Linux Commands
You can even run Linux commands directly in Windows, like:
This lists files in your Linux home directory — no need to open the full terminal.
11. Basic Linux Commands You Should Know
If you’re new to Linux, here are essential commands to start with:
| Command | Description |
|---|---|
ls |
Lists files and directories |
cd |
Changes directory |
pwd |
Prints current working directory |
mkdir |
Creates a new folder |
rm |
Removes files |
cp |
Copies files |
mv |
Moves or renames files |
cat |
Displays file contents |
sudo apt update |
Updates package list |
sudo apt install <package> |
Installs software |
Example:
To install Git in Ubuntu, use:
12. How to Access Windows Files from WSL (and Vice Versa)
One of WSL’s coolest features is file sharing between systems.
Access Windows files from WSL:
Your Windows drives are mounted under /mnt/.
For example:
Access WSL files from Windows:
Open File Explorer and enter:
You’ll see your installed Linux distributions and files.
13. How to Update or Uninstall WSL
To update WSL:
To uninstall a Linux distro:
To uninstall WSL completely:
-
Open Settings → Apps → Installed Apps.
-
Search for your Linux distribution and uninstall it.
-
Run this command in PowerShell:
14. Troubleshooting Common WSL Issues
WSL not starting?
Run:
Then ensure virtualization is enabled in BIOS.
Network not working?
Restart WSL using:
“Invalid command” errors?
Make sure your distro is up to date:
15. Best Practices for Using WSL Efficiently
-
✅ Always use WSL 2 for better performance.
-
🔄 Keep your Linux system updated regularly.
-
⚙️ Use Windows Terminal for a better experience.
-
💾 Don’t store large files inside the Linux file system — use
/mnt/cinstead. -
🧠 Learn basic Bash scripting to automate tasks.
-
🧩 Integrate with VS Code Remote – WSL extension for seamless coding.
16. Conclusion
WSL transforms how Windows users interact with Linux. Whether you’re a developer, system administrator, or simply curious about Linux, WSL in Windows 11 is the perfect environment to explore.
With just a few commands, you can install, configure, and use Linux alongside Windows — without the complexity of dual booting or virtualization.
So go ahead — launch your terminal, try out some commands, and experience the best of both worlds!
17. FAQs About WSL on Windows 11
1. Is WSL safe to use on Windows 11?
Yes. WSL runs in a secure, sandboxed environment separate from your main Windows system.
2. Can I install multiple Linux distributions in WSL?
Absolutely. You can install multiple distros and switch between them using wsl -l -v.
3. Does WSL work offline?
Yes — once installed, you can use Linux commands offline. However, updates and installations need internet access.
4. Can I run graphical Linux apps in WSL?
Yes! WSL 2 supports GUI Linux apps natively — no additional setup required.
5. How do I reset my Linux distribution in WSL?
Run:
Then reinstall it from the Microsoft Store.
18. Summary — Key Takeaways
| Key Point | Description |
|---|---|
| WSL Definition | Lets you run Linux inside Windows |
| Best Version | Use WSL 2 for full Linux kernel and better speed |
| Install Command | wsl --install |
| Default Distro | Ubuntu |
| Access Files | Windows → \\wsl$ |
| Ideal Use Case | Developers, learners, sysadmins |
| Bonus Tip | Pair WSL with VS Code for a powerful dev setup |
In short:
Using WSL in Windows 11 is like unlocking a secret developer superpower — fast, lightweight, and incredibly convenient. Once you start using it, you’ll wonder how you ever lived without it.
