How To Install WSL (Linux On Windows) In Windows 11 (2026)
Windows Subsystem for Linux, or WSL, lets you run Linux inside Windows 11 without a separate PC or dual boot.
On a PC that has never had it, you install it with a single command in an administrator PowerShell window and then restart.
This guide follows Microsoft’s own WSL pages and covers the command, picking a distribution, first-time setup and the usual error codes.
Quick answer: install WSL
| Step | What to do |
|---|---|
| 1 | Right-click Start and open Terminal (Admin) or Windows PowerShell as administrator. |
| 2 | Run wsl –install. |
| 3 | Restart the PC. |
| 4 | Let Ubuntu finish its first-launch setup, then create a Linux username and password. |
What you need first
Microsoft says WSL needs Windows 10 version 2004 or higher (build 19041 or higher), or Windows 11.
WSL 2, which is what the install command sets up, also needs virtualization turned on in the BIOS or UEFI and a processor that supports second-level address translation.
Microsoft names Intel Nehalem (Core 1st generation) and AMD Opteron or newer as supporting it, and says older chips such as the Core 2 Duo cannot run WSL 2.
If virtualization is off, our guide on turning on virtualization in Windows 11 comes first.
Install WSL with one command
- Right-click the Start button and select Terminal (Admin), or search for PowerShell and select Run as administrator.
- Type this command and press Enter:
wsl –install
- Wait while Windows turns on the features WSL needs and downloads Ubuntu.
- Restart the PC when the command finishes.
Microsoft says this command installs the Ubuntu distribution by default.
The first time you open a new distribution, a console window waits while files decompress, which can take a few minutes, and later launches should take under a second.
Set up your Linux username and password
After the restart, Ubuntu opens and asks you to create a username and password.
Microsoft says this account is specific to each Linux distribution and has no bearing on your Windows username.
It also says this account is the Linux administrator and can run sudo commands.
When you type the password, nothing appears on the screen, which Microsoft calls blind typing and says is completely normal.
Every distribution you add, reinstall or reset needs its own account set up the same way.
Install a different Linux distribution
To see the distributions available from the online store, run this command:
wsl –list –online
To install one, run the install command with the -d flag and the distribution name, for example:
wsl –install -d Debian
Microsoft’s page gives Ubuntu, Debian, SUSE, Kali, Fedora, Pengwin and Alpine as examples, so use the exact name shown in the online list.
| Command | What it does |
|---|---|
| wsl –install | Turns on WSL and installs Ubuntu |
| wsl –list –online | Lists distributions you can install |
| wsl –install -d [name] | Installs the distribution you name |
| wsl –list –verbose | Shows installed distributions, state and WSL version |
Open Linux after it is installed
- Select Start, type the distribution name such as Ubuntu, and open it.
- Or type wsl in PowerShell or Windows Terminal to open the default distribution.
- Or run one command only, such as wsl pwd.
- Type exit to leave the Linux shell.
To change the default distribution, run wsl –set-default followed by the name, and to open a specific one without changing the default, run wsl –distribution followed by the name.
Update WSL and Linux
Run wsl –update in PowerShell to update WSL to the latest version.
Microsoft says Windows does not update the Linux software inside a distribution for you.
For Ubuntu or Debian, Microsoft gives this command to run inside the Linux window:
sudo apt update && sudo apt upgrade
To check what you have, run wsl –version for the WSL version, or wsl –status for the default distribution and kernel version.
WSL 1 and WSL 2
Microsoft says distributions installed with wsl –install default to WSL 2.
| Task | Command |
|---|---|
| See each distribution’s version | wsl –list –verbose |
| Set the default for new installs | wsl –set-default-version 2 |
| Convert an existing distribution | wsl –set-version Ubuntu 2 |
Fix common WSL install errors
| Message | What Microsoft says to do |
|---|---|
| 0x80370102 or 0x80070003 | Turn on virtualization in the BIOS or UEFI, usually under the CPU options. |
| 0x80070003 | WSL runs only on the system drive, so on Windows 11 go to Settings, System, Storage, Advanced storage settings, Where new content is saved, and keep it on that drive. |
| 0x8007019e | The Windows Subsystem for Linux component is off. Turn it on in Turn Windows features on or off. |
| The term wsl is not recognized | Install the WSL optional component. On Arm64 PCs, run wsl.exe from PowerShell Core or Command Prompt. |
| No installed distributions | Launch the distribution at least once, and do not use the built-in Administrator account. |
| WSL 2 requires an update to its kernel component | Install the Linux kernel update package from Microsoft’s manual install page. |
Microsoft says wsl –install works only if WSL is not installed at all, and if it shows the help text instead, use the distribution steps above.
If the install hangs at 0.0 percent, Microsoft suggests wsl –install –web-download -d followed by the distribution name.
If you forget your Linux password
- In PowerShell, run wsl -u root.
- Run passwd followed by your Linux username.
- Type the new password twice, then run exit.
For a distribution that is not the default, Microsoft says to run wsl -d followed by the name, then -u root.
Remove a Linux distribution
Run wsl –unregister followed by the distribution name.
Microsoft warns that once a distribution is unregistered, all data, settings and software tied to it are permanently lost.
Copy anything you need out of the distribution first.
Where to keep your files
Microsoft advises storing files in the same system as the tools you use on them, because working across the two file systems can be much slower.
Files for Linux tools belong in the Linux file system, and files for Windows tools belong in the Windows file system.
From a Linux folder, run explorer.exe ., with the trailing period, to open it in File Explorer.