What Windows Subsystem for Linux is and why you might want it
Windows Subsystem for Linux (WSL) is a tool that lets you run a Linux environment directly on Windows without needing a separate virtual machine or dual boot. If you work with code, manage servers, or use command-line tools built for Linux, WSL gives you access to those tools while staying in Windows.
WSL comes in two versions. WSL 2 is the newer one and runs a real Linux kernel, which makes it faster and more compatible with Linux software. WSL 1 is older and slower but uses fewer computer resources. Most people should choose WSL 2 unless your machine is very old or you have specific reasons to use WSL 1.
The main trade-off is that WSL takes up disk space and some RAM, and it adds another layer of software to maintain. But if you regularly switch between Windows and Linux tools, it saves you the friction of rebooting or managing two separate machines.
Key Takeaways
- WSL 2 requires Windows 10 version 2004 or later, or Windows 11, and your processor must support virtualization (most modern ones do).
- You install WSL through PowerShell with a single command, then choose a Linux distribution from the Microsoft Store.
- After installation, you launch your Linux environment from the Start menu or Windows Terminal and set up a username and password.
- WSL stores files in a separate partition, so moving files between Windows and Linux requires knowing the correct paths.
Check your Windows version and hardware first
WSL 2 needs Windows 10 version 2004 or later, or any version of Windows 11. To check your version, press Windows key + R, type winver, and press Enter. Look at the "Version" number — it should be 2004 or higher.
Your processor must also support virtualization. Most Intel and AMD processors made in the last ten years do, but some older or budget models do not. If you are not sure, open PowerShell as administrator and run Get-WmiObject Win32_Processor | Select-Object Name, VirtualizationFirmwareEnabled. If it says "True", you are ready. If it says "False" or nothing appears, you may need to enable virtualization in your BIOS settings — this varies by computer manufacturer, so search your model number plus "enable virtualization".
You also need at least 4 GB of RAM, though 8 GB or more is better if you plan to run multiple programs at once.
Enable the WSL feature in Windows
Open PowerShell as administrator. Right-click the PowerShell icon in your Start menu and choose "Run as administrator", or press Windows key, type "PowerShell", right-click it, and select "Run as administrator".
In the PowerShell window, paste this command and press Enter:
wsl --install
This command enables WSL, installs WSL 2, and sets up Ubuntu (the most common Linux distribution) automatically. The process takes a few minutes. When it finishes, you will see a message saying the installation is complete.
Restart your computer when prompted. This is required for the changes to take effect.
Choose and install a Linux distribution
If you ran the command above, Ubuntu is already installed. If you want a different distribution — such as Debian, Fedora, or Kali — open the Microsoft Store, search for the distribution name, and click "Get" or "Install".
The most common choices are Ubuntu (good for beginners and general use), Debian (similar to Ubuntu but more stable), and Fedora (newer software but less stable). Unless you have a specific reason to choose otherwise, Ubuntu is the safest choice.
You can install multiple distributions at once if you need them. Each one takes up disk space, so check how much free space you have first — distributions typically use 1 to 3 GB each.
Launch WSL and create your user account
Open your Start menu and search for the distribution you installed — for example, "Ubuntu". Click it to launch. A terminal window will open and ask you to create a username and password.
The username can be anything you want and does not have to match your Windows username. The password is what you will type when WSL asks for administrator permission to install software or make system changes. Write both down somewhere safe.
After you set the password, the terminal will show a command prompt that looks like username@computername:~$. You are now inside your Linux environment and can run Linux commands.
Access your files and understand the file system
WSL stores its files separately from Windows. Your Linux home directory is not the same as your Windows user folder. This can be confusing at first.
From inside WSL, you can access your Windows files at /mnt/c (for your C: drive), /mnt/d (for D: drive), and so on. So if you have a file at C:\Users\YourName\Documents\myfile.txt, you can reach it in WSL at /mnt/c/Users/YourName/Documents/myfile.txt.
From Windows, you can access your WSL files by opening File Explorer and typing \\wsl$ in the address bar. This shows your Linux distributions as folders. You can copy files back and forth this way, but it is slower than accessing them from inside WSL.
Most people keep their work files in Windows and access them through /mnt/c from WSL, rather than storing files inside the Linux partition.
Use Windows Terminal for a better experience
The default terminal window works, but Windows Terminal is faster and more flexible. It is free and available in the Microsoft Store. Search for "Windows Terminal", click "Get", and install it.
Windows Terminal lets you open multiple tabs, each running a different distribution or PowerShell. You can also customize colors, fonts, and keyboard shortcuts. When you open Windows Terminal, you can click the dropdown arrow next to the plus sign and choose which environment to launch.
Windows Terminal is not required to use WSL, but it makes the experience smoother, especially if you switch between Windows and Linux tools often.
Frequently Asked Questions
Do I need to uninstall anything before installing WSL?
No. WSL installs alongside Windows without removing or replacing anything. If you have an older version of WSL 1, the install command upgrades it to WSL 2 automatically.
Can I run graphical Linux programs in WSL?
WSL 2 on Windows 11 supports graphical applications natively. On Windows 10, you need an X server like VcXsrv or Xming installed on Windows, then configure WSL to use it. Most people use WSL for command-line tools only.
How much disk space does WSL use?
A fresh Ubuntu installation uses about 1 to 2 GB. As you install software and create files, it grows. You can see how much space your distribution is using by running du -sh ~ inside WSL, which shows the size of your home directory.
What if the install command does not work?
Make sure you are running PowerShell as administrator, not as a regular user. Also check that virtualization is enabled in your BIOS. If you still have problems, search your exact error message — it usually points to a specific setting that needs to be changed.
Can I use WSL if I have antivirus software running?
Yes, but some antivirus programs slow down WSL significantly because they scan the Linux files constantly. If WSL feels very slow, try excluding the WSL folder from your antivirus scans. Check your antivirus documentation for how to do this.