To install WSL2 on Windows 11, right-click Start, select Terminal (Admin), run wsl --install, and restart your PC. The command turns on the Windows Subsystem for Linux, installs WSL2, and adds Ubuntu. After the restart, Ubuntu opens and asks you to create a Linux user name and password.
WSL lets you run Linux tools, the Bash shell, and even Linux apps with windows directly on Windows 11, without a separate virtual machine or dual boot. For a full desktop in a virtual machine instead, you can run a virtual machine on Windows 11.
How to Install WSL2
- Right-click Start and select Terminal (Admin). Select Yes in the User Account Control prompt.
- Type this command and press Enter:
wsl --install

- Wait for the download and setup to finish, then restart the PC.
- After the restart, Ubuntu opens in a terminal window. If it doesn’t, select Start and open Ubuntu.
- Wait a minute while it unpacks the first time.
- Enter a new Linux user name and password. These are separate from your Windows account, and the password doesn’t show as you type.


New installs use WSL 2 by default, so you don’t need to set it separately. Microsoft’s WSL install documentation covers the same steps.
Update Ubuntu after installing
Run this inside Ubuntu to get the latest packages. It asks for the Linux password you just created.
sudo apt update && sudo apt upgrade
Install WSL in Windows 10
For Windows 10, check winver first: the simple installation command requires version 2004, build 19041 or later. Open PowerShell as administrator, run wsl --install, and restart when requested. Launch the installed distribution and create its Linux user as described above, then check wsl -l -v for version 2. Microsoft’s installation guide covers both Windows versions and links to a separate manual process for older builds. Enabling only the Windows Subsystem for Linux checkbox does not by itself install a usable Linux distribution.
Install a Different Linux Distribution
- Run
wsl --list --onlineto see the available distributions.

wsl --install -d.- Run
wsl --install -dfollowed by the name, for example:
wsl --install -d Debian
To make that distribution the one that opens when you type wsl, run wsl --set-default Debian.
Want Kali instead of Ubuntu or Debian? The Kali Linux on Windows 11 steps explain its specific installation command, first-launch setup, verification and optional Win-KeX desktop.
How to Use WSL After Installing
Once the first-run account setup finishes, you can open Ubuntu from Start whenever you need Linux. You do not need to repeat the installation or enable Windows features each time.
- Open a regular PowerShell tab in Terminal and run
wsl -l -v. Check that your distribution is listed and its VERSION column says 2.

- Run
wsl ~to open the default distribution in your Linux home folder. To choose another installed distribution, usewsl -d Debian, replacing Debian with its listed name. - Inside Linux, run
pwdto show your current folder andlsto list its files. Runcd ~to return to your Linux home folder. - To browse that folder in Windows, run
explorer.exe .inside Linux. Include the space and final period. Your Windows C drive is also available at/mnt/c.

- Type
exitto leave the Linux shell and return to PowerShell. This does not uninstall Ubuntu or delete your saved files.
Keep Linux development projects in the Linux home folder for better file performance. Use /mnt/c when you need Windows files, and put quotes around paths containing spaces. Linux filenames distinguish uppercase and lowercase letters. Microsoft explains these differences in its Windows and Linux file systems guide.
Python inside Ubuntu is separate from Windows, so to run Python scripts in Windows itself, install Python on Windows 11 on its own. Git is separate in the same way: the copy you get from installing Git on Windows 11 isn’t used inside your Linux distribution, which needs its own.
If you only need Python notebooks, you can skip Linux and install Jupyter Notebook on Windows 11 directly.
Installing WSL does not automatically install Docker. If you need containers, follow Docker’s WSL 2 instructions and check its prerequisites. Distribution access is configured in Docker Desktop under Settings > Resources > WSL Integration.
Useful WSL Commands
wsl -l -v: list installed distributions and whether each uses WSL 1 or 2.wsl --set-version Ubuntu 2: convert an existing distribution to WSL 2. Back up important Linux files before converting; the conversion can take time and fail.wsl --update: update WSL to the latest version.wsl --shutdown: stop all running distributions immediately. Save your work first; this ends running Linux processes.
More commands are listed in Microsoft’s basic WSL commands.
What You Can Do With WSL2
- Run Linux apps with windows: WSL supports Linux GUI apps on Windows 11. Install one in Ubuntu, such as sudo apt install gedit, and it appears in the Start menu. Microsoft’s Linux GUI apps guide has more detail.
- Code in VS Code: install the WSL extension in Visual Studio Code to edit and run projects stored in Linux. See Microsoft’s VS Code with WSL tutorial.
- Open Windows files: your C drive is available in Linux at /mnt/c.
WSL2 vs. Dual Booting Ubuntu
Use WSL2 if you want Linux tools and apps while Windows keeps running, and dual boot only if you need Ubuntu’s full desktop running directly on your hardware with no Windows underneath.
Dual booting puts Ubuntu on its own disk partition, so you choose one system each time the PC starts and can’t use both at once. It makes sense for testing Ubuntu as a daily system or for hardware and software that doesn’t work well under WSL. The outline below follows Canonical’s Install Ubuntu Desktop tutorial, which has the full details.
- Back up your important files to an external drive or cloud storage before you change any partitions.
- Make sure the PC has at least 25GB of free storage for Ubuntu.
- If BitLocker is on, check the tutorial’s BitLocker section first, because the installer can’t read an encrypted drive correctly.
- Download the Ubuntu Desktop image from ubuntu.com and write it to a USB flash drive (12GB or larger recommended) with a tool such as balenaEtcher. This erases the flash drive.
- Restart with the USB drive plugged in and open the boot menu, usually with F12 (sometimes Esc, F2, or F10), then select the USB drive.
- Select Install Ubuntu. When the installer finds Windows, choose the option to install Ubuntu alongside it and use the slider to set Ubuntu’s disk space. Don’t choose Erase disk and install Ubuntu, which removes Windows.
- Finish the setup and restart. A boot menu then lets you pick Ubuntu or Windows at each startup.
If the Install Fails

- Error 0x80370102 or a virtualization message: WSL2 needs hardware virtualization. Turn on Intel VT-x or AMD-V (sometimes called SVM) in the BIOS or UEFI settings. Here is how to turn on hardware virtualization in Windows 11.
wsl --installonly shows help text: WSL is already partly installed. Runwsl --install -d Ubuntuinstead.- The install hangs at 0.0%: try
wsl --install --web-download -d Ubuntu, which downloads the distribution first. - Old or broken WSL: run
wsl --update, then restart the PC.
Microsoft’s WSL troubleshooting guide lists other error codes and fixes.
How to Uninstall WSL
First decide whether you’re removing one Linux distribution or WSL itself. Save your Linux work, and check whether apps such as Docker Desktop depend on WSL. Microsoft has reference pages for the listing, export and removal commands and for distribution backups. To remove one distribution:
- In Terminal or PowerShell, run
wsl --list --verboseand note the exact distribution name. - Back it up with
wsl --export "ExactName" "C:\Backups\ExactName.tar", using the exact name and an existing Windows folder. Wait for it to finish and check that the .tar file exists. - Run
wsl --unregister "ExactName". This permanently deletes that distribution’s Linux files, settings, and installed software. - Run
wsl --list --verboseagain to confirm the name is gone. - To remove its launcher app, open Settings > Apps > Installed apps, find the distribution (such as Ubuntu), select the three-dot menu > Uninstall, and confirm.
To remove WSL itself once no distributions are left (Microsoft’s app-removal instructions cover this screen):
- Open Settings > Apps > Installed apps.
- Find Windows Subsystem for Linux, select the three-dot menu > Uninstall, and confirm.
If WSL was installed as a Windows feature, or the features are still on after you remove the app, turn them off. Microsoft’s manual installation guide lists these features.
- Select Start, type Turn Windows features on or off, and open it.
- Clear Windows Subsystem for Linux.

- Clear Virtual Machine Platform only if no other virtual machine app needs it.
- Select OK and restart if Windows asks.
Don’t delete Windows system folders or Linux disk files by hand. Reinstalling WSL won’t bring back an unregistered distribution; only your backup can. These steps don’t remove an Ubuntu dual-boot partition.
WSL2 Questions
Does WSL2 work on Windows 11 Home?
Yes. WSL2 works on Home, Pro, and other editions of Windows 11.
What version of Windows do I need for WSL?
Any version of Windows 11 works. On Windows 10, the wsl --install command needs version 2004 (build 19041) or later, according to Microsoft’s install guide.
How do I make WSL2 the default for new distributions?
It already is on new installs. If an older setup still uses WSL 1, run wsl --set-default-version 2.
Where are my Linux files?
In File Explorer, select Linux in the left pane to browse each distribution’s files.
How do I uninstall a Linux distribution from WSL?
Run wsl --unregister Ubuntu (use your distribution’s name from wsl --list). This permanently deletes that distribution’s files, settings, and installed software, so copy anything you need to Windows first. You can also uninstall the distribution app from Settings > Apps > Installed apps.
If a Windows command-line tool isn’t found, you may need to add its folder to your Path. To do that, open environment variables in Windows 11.

Matthew Burleigh is the founder, head writer, and editor of Solve Your Tech, which he launched in 2012. He has written technology tutorials since 2008 and worked in IT since 2003, including small-business support, IT management, and consulting. He holds Bachelor’s and Master’s degrees in Computer Science from Arizona State University.
Matthew writes practical guides for Windows, iPhone and iPad, Microsoft Office, Outlook, Google apps, and Android. Solve Your Tech’s guides are checked step by step against the device or app maker’s own documentation and tested on his own devices whenever he has the hardware or software, with clear steps, sources, and update dates.
Read more about Matthew and how Solve Your Tech writes and updates its guides, or report a correction.