How to Install Linux on Windows Using WSL
The Windows Subsystem for Linux (WSL) lets you run a full Linux environment directly inside Windows, with no dual boot and no virtual machine to manage. It is the fastest way to get a real Linux command line on a Windows PC, and setup takes just a few minutes.
What Is WSL and Why Use It
WSL 2 runs a genuine Linux kernel in a lightweight, highly optimized virtual machine. You get full system call compatibility, fast file performance, and the ability to run Linux tools, compilers, and even Docker alongside your Windows apps. It is ideal for:
Read also: Windows 11: How to Install the New Update
- Web and software development using Linux toolchains.
- Running Bash scripts and Linux command-line utilities.
- Learning Linux without repartitioning your drive.
- Using tools like
grep,ssh,git, and package managers natively.
Requirements
- Windows 11, or Windows 10 version 2004 (build 19041) or higher.
- Virtualization enabled in the BIOS/UEFI (usually on by default).
- An administrator account to run the installation command.
The One-Command Install
On modern Windows, installation is a single command. Open PowerShell or Windows Terminal as Administrator and run:
wsl --install
This command does everything for you:
- Enables the required WSL and Virtual Machine Platform features.
- Downloads and installs the latest Linux kernel.
- Sets WSL 2 as the default version.
- Installs Ubuntu as the default distribution.
Restart your computer when prompted. After rebooting, Ubuntu launches automatically to finish setup.
First-Time Setup
The first time Ubuntu starts, it asks you to create a Linux user:
- Enter a username (lowercase, no spaces). This is separate from your Windows account.
- Enter a password. You will not see characters as you type, which is normal.
Then update the system immediately so you have the latest packages:
sudo apt update && sudo apt upgrade -y
Choosing a Different Distribution
Ubuntu is the default, but you can install others. To see what is available:
wsl --list --online
Then install one by name, for example:
wsl --install -d Debian
Popular choices include Debian, Kali Linux, and various openSUSE and Fedora images. You can run several distributions side by side.
Useful Tips for Daily Use
- Access Windows files: Your C: drive is mounted at
/mnt/cinside Linux. - Access Linux files from Windows: Type
\\wsl$in File Explorer, or runexplorer.exe .from the Linux shell. - Keep project files in the Linux filesystem (your home directory) for the best performance, not under
/mnt/c. - Use Windows Terminal for a much better experience with tabs and proper color support.
- Shut down WSL with
wsl --shutdownif you need to reset it or free memory.
Frequently Asked Questions
Does WSL slow down Windows?
No. WSL 2 uses a lightweight virtual machine that only consumes resources while it is running, and it releases memory back to Windows when idle. For most users the impact is negligible.
Can I run graphical Linux apps in WSL?
Yes. Modern WSL includes WSLg, which lets you run Linux GUI applications directly on the Windows desktop with no extra configuration, including their audio.
Is WSL good enough for real development?
Absolutely. Many developers use WSL as their primary environment for web development, scripting, and containers. It integrates well with editors like VS Code, which has a dedicated WSL extension.
What is the difference between WSL 1 and WSL 2?
WSL 1 translated Linux system calls to Windows, while WSL 2 runs a real Linux kernel in a managed virtual machine. WSL 2 is faster for most workloads, supports full system call compatibility, and is the recommended default.






