How to Install and Use Windows Subsystem for Linux in Windows 11
Install WSL 2 in Windows 11 with one command, choose a Linux distribution, update WSL, and understand where to store Linux project files for best performance.
- Applies to Windows 11
- 3 min read
View article illustration

Windows Subsystem for Linux (WSL) lets you run a Linux environment directly inside Windows 11 without setting up a traditional dual-boot system or managing a full desktop virtual machine.
For developers, administrators, students, and anyone who needs Linux command-line tools alongside Windows applications, WSL 2 is now the simplest way to get started.
Install WSL with one command
Open Terminal (Admin) and run:
wsl --installOn a Windows 11 PC where WSL has not already been installed, this enables the required Windows components, installs the current WSL package and Linux kernel, sets WSL 2 as the default, and installs Ubuntu by default.
Restart the PC if Windows asks you to.
Choose a different Linux distribution
To see distributions available through WSL, run:
wsl --list --onlineThen install the one you want:
wsl --install -d DebianReplace Debian with the distribution name shown by the online list.
Finish the Linux setup
Launch the distribution from Start or Windows Terminal. The first launch expands the Linux file system and asks you to create a Linux username and password.
This Linux account is separate from your Windows account. The password is used for Linux administrative commands such as sudo.
Check which WSL version you are using
Run wsl --list --verbose. The VERSION column shows whether each installed distribution is using WSL 1 or WSL 2. New installations normally use WSL 2.
Keep WSL updated
Run wsl --update periodically. WSL is serviced independently enough that updating Windows alone is not always the only maintenance step worth checking.
Where should Linux project files live?
If a project is primarily used by Linux tools, keep it inside the Linux file system—for example under your Linux home directory. Microsoft recommends this for better file-system performance.
Windows drives are still available from Linux under locations such as /mnt/c, which is useful when you intentionally need to work with Windows files.
Use Windows Terminal and VS Code with WSL
Windows Terminal can open PowerShell, Command Prompt, and installed Linux distributions in separate tabs. If you use Visual Studio Code, install the WSL extension and open a Linux project with code .. This lets the editor stay on the Windows desktop while its extensions, tools, Git, and commands operate inside Linux.
Current WSL releases can also run supported Linux GUI applications, so the environment is no longer limited to text-only shells.
Useful commands to remember
wsl— open the default Linux distribution.wsl --shutdown— stop all running WSL distributions and the WSL 2 VM.wsl --status— show WSL configuration information.wsl --list --verbose— list installed distributions and versions.
WSL is not the same as a full VM
WSL is ideal when you want Linux tools tightly integrated with Windows. If you need a completely isolated machine, custom virtual hardware, snapshots, or a different Windows guest OS, Hyper-V is a better fit.
For most development workflows, WSL gives you Linux shells, package managers, compilers, services, GUI app support, and Windows interoperability without leaving your Windows desktop.


