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. If you need a full Linux or Windows desktop instead, see how to 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 a Different Linux Distribution
- Run
wsl --list --onlineto see the available distributions. - 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? Our Kali Linux on Windows 11 guide explains 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.
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.
Microsoft lists more in its 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 explains this in its Linux GUI apps guide.
- 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.
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. See how to turn on hardware virtualization in Windows 11.
wsl --install only shows help text:WSL is already partly installed. Runwsl --install -d Ubuntuinstead.- The install hangs at 0.0%: Microsoft suggests
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.
Frequently Asked 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. See how to open environment variables in Windows 11.

Matthew Burleigh has been writing tech tutorials since 2008. His writing has appeared on dozens of different websites and been read hundreds of millions of times.
After receiving his Bachelor’s and Master’s degrees in Computer Science he spent several years working in IT management for small businesses. However, he now works full time writing content online and creating websites.
His main writing topics include iPhones, Microsoft Office, Google Apps, Android, and Photoshop, but he has also written about many other tech topics as well.