What Is WSL? Explained
WSL, the Windows Subsystem for Linux, lets Windows run a real Linux environment alongside it, without dual-booting into a separate operating system or setting up and managing a traditional virtual machine. For developers who want Linux tools without leaving Windows as their daily desktop, it has become the default way to get both.
What WSL actually is
WSL is a Windows feature that runs a genuine Linux distribution, Ubuntu, Debian, or others, directly integrated with Windows: a Linux command line reachable from a Windows terminal, file access between the two environments, and (in current versions) even Linux graphical applications appearing as normal windows on the Windows desktop.
wsl --install
Run from an Administrator PowerShell prompt on a current Windows version, this single command installs WSL itself along with a default Linux distribution (Ubuntu, unless you specify otherwise) in one step. A restart is typically required afterward before the installed distribution is usable.
WSL1 vs WSL2
WSL1, the original version, worked by translating Linux system calls into equivalent Windows system calls on the fly, with no actual Linux kernel involved at all. This gave fast access to files on the Windows filesystem, but had real compatibility gaps: software relying on Linux kernel features the translation layer did not fully replicate simply did not work correctly.
WSL2 takes a different approach entirely: it runs a real Linux kernel inside a lightweight, purpose-built virtual machine. This closes most of the compatibility gaps WSL1 had, at the cost of somewhat slower performance specifically when accessing files that live on the Windows filesystem from within the Linux environment (files living natively within WSL2’s own filesystem are not affected by this tradeoff). WSL2 is the current default and the right choice for the vast majority of users today; WSL1 mainly persists as an option for specific edge cases involving heavy cross-filesystem file access performance.
wsl -l -v
This lists installed distributions along with which WSL version (1 or 2) each is currently using.
Installing a specific distribution
wsl --list --online
Lists every distribution available through the WSL distribution catalog.
wsl --install -d Debian
Installs a specific named distribution rather than the default Ubuntu. Multiple distributions can be installed side by side, each an independent environment.
wsl # launches your default distribution
wsl -d Debian # launches a specific distribution by name
Accessing files between Windows and Linux
From inside a WSL Linux environment, the Windows filesystem is accessible under /mnt/:
cd /mnt/c/Users/YourName/Documents
From Windows, the WSL filesystem is accessible through a special network-style path, or directly through File Explorer by typing \\wsl$ in the address bar:
\\wsl$\Ubuntu\home\username
For performance reasons, files that will be worked with heavily from the Linux side are generally better kept within the Linux filesystem itself (under /home/, for example) rather than accessed constantly from /mnt/c/, since cross-filesystem access carries more overhead than access to a file living natively in whichever environment is using it.
Graphical Linux applications
Current WSL2 supports running Linux graphical applications directly, a feature generally referred to as WSLg, without needing to install and configure a separate X server manually the way earlier WSL setups required:
sudo apt install gimp
gimp
Running a graphical Linux application like this launches it as a normal-looking window directly on the Windows desktop, blurring the line between the two environments considerably compared to WSL’s original command-line-only design.
What WSL is good for, and what it isn’t
WSL is well suited to development work, running Linux-native build tools, testing scripts and software that assume a Linux environment, and using command-line utilities that are Linux-first or Linux-only, all without leaving Windows as your primary desktop. It integrates closely enough with Windows that switching between the two feels lightweight rather than like managing a genuinely separate machine.
It is a weaker fit for workloads that need full, direct hardware access (certain specialized hardware interaction, or GPU-intensive Linux-native gaming, for example), or for anyone who specifically wants a complete, isolated Linux desktop experience for daily use, where a traditional virtual machine or a real dual-boot installation remains the better-suited choice. WSL’s core value is proximity to Windows, not replacing a full Linux installation for every possible use case.
Frequently Asked Questions
What is WSL and who is it for?
WSL (Windows Subsystem for Linux) is a feature built into Windows that lets you run a Linux environment, a real distribution like Ubuntu or Debian, directly alongside Windows, without dual-booting or setting up a traditional virtual machine yourself. It is aimed primarily at developers and technical users who want Linux command-line tools, development environments, or software that assumes a Linux environment, while still using Windows as their primary desktop operating system for everything else, rather than switching entirely to a separate Linux installation.
What is the difference between WSL1 and WSL2?
WSL1 worked by translating Linux system calls into equivalent Windows system calls on the fly, without an actual Linux kernel involved at all, which gave very fast file access between Windows and the Linux environment but had compatibility gaps for anything relying on kernel features the translation layer did not fully replicate. WSL2 instead runs a real, actual Linux kernel inside a lightweight, purpose-built virtual machine, providing dramatically better compatibility with real Linux software and kernel features, at the cost of somewhat slower access to files that live on the Windows filesystem specifically (cross-filesystem access, Linux to Windows or Windows to Linux, has more overhead than access to files that live natively within WSL2’s own filesystem). WSL2 is the current default and the right choice for the vast majority of users today.
Is WSL a virtual machine?
WSL2 specifically is technically implemented using a lightweight virtual machine under the hood, running a real Linux kernel, but it is designed and integrated to feel nothing like a traditional VM in daily use: no separate VM management window to open, tight integration with Windows so Linux command-line tools and even graphical Linux applications can be launched directly from a Windows terminal or the Windows Start menu, and file access between Windows and Linux that works close to seamlessly rather than requiring explicit shared folder configuration the way many traditional VM setups do. WSL1, by contrast, used no virtual machine or Linux kernel at all, relying entirely on system call translation instead.
How do I install WSL and a Linux distribution?
On a current version of Windows, open PowerShell as Administrator and run wsl —install, which installs WSL itself along with a default Linux distribution (Ubuntu, unless specified otherwise) in one step. To install a specific distribution instead, or an additional one alongside the default, wsl —list —online shows every distribution available through the Microsoft Store’s WSL distribution list, and wsl —install -d DistroName installs a specific one by name, such as wsl —install -d Debian. A restart is typically required after the initial WSL installation before the installed distribution is usable.
Can I run graphical Linux applications in WSL?
Yes, current versions of WSL2 support running Linux graphical applications directly, appearing as normal windows on the Windows desktop, without needing a separate X server or remote desktop tool configured manually, a feature generally referred to as WSLg. This means installing a Linux GUI application inside your WSL distribution and launching it produces a window on your Windows desktop just like a native Windows application would, blurring the line between the two environments considerably further than earlier WSL versions, which were command-line only.
Should I use WSL or a full virtual machine or dual-boot setup instead?
WSL is the better fit when you want Linux tools and environments available alongside Windows for development, scripting, or command-line work, without wanting to leave Windows as your primary desktop or manage a separate VM. A traditional virtual machine gives you a more fully isolated, complete Linux desktop environment, useful when you specifically need to test a full Linux desktop experience, run software with kernel-level requirements WSL does not support, or want stronger isolation between the two environments. Dual-booting gives you full native performance and complete hardware access on the Linux side, which matters for things like GPU-intensive Linux-native gaming or work that needs direct, unmediated hardware access, at the cost of needing to reboot to switch between the two operating systems entirely, rather than running both simultaneously the way WSL and a VM both allow.