How to install WSL on Windows 11 and run Linux in one command
By Pull This RepoPosted 5 min read
Short answer
To install WSL, open PowerShell as administrator, run wsl --install and restart your PC. That one command turns on the Windows features WSL needs and installs Ubuntu running on WSL 2. It works on Windows 11 and on Windows 10 version 2004 or later. After the restart, open Ubuntu from the Start menu and create a Linux username and password.
WSL, the Windows Subsystem for Linux, runs a real Linux distribution such as Ubuntu or Debian inside Windows, with no dual boot and no virtual machine to manage yourself. The WSL install is one command in an administrator PowerShell window, followed by a restart. This page covers that command, choosing a distro, WSL 1 versus WSL 2, moving files between Windows and Linux, and the errors that stop an install. Every command was checked against Microsoft's WSL docs on 22 November 2026.
WSL itself is open source: the microsoft/WSL repo is MIT licensed, had 34,443 stars on GitHub on 22 November 2026, and published release 3.0.5 on 3 November 2026.
How do you install WSL on Windows 11?
Run wsl --install from an administrator PowerShell and restart:
- Click Start, type PowerShell, right-click it and choose Run as administrator.
- Run the install command:
wsl --install- Restart your PC when it finishes.
- Open Ubuntu from the Start menu. The first launch takes a little while as files are decompressed; Microsoft says later launches should take under a second.
- Create a Linux username and password when asked. This account is separate from your Windows login, and the password is what
sudowill ask for.
Microsoft's docs say the command "will enable the features necessary to run WSL and install the Ubuntu distribution of Linux." New installs are set to WSL 2 by default.
Once you are in, update the system the way you would on any Ubuntu machine:
sudo apt update && sudo apt upgradeWhich Windows versions can run WSL?
You need Windows 11, or Windows 10 version 2004 (build 19041) or later, to use wsl --install. Microsoft points older Windows 10 builds to its manual install steps. WSL 2 itself needs Windows 10 version 1903 (build 18362) or later. Press Windows key + R, type winver and press Enter to see your version.
How do you choose a different Linux distro?
List what is available, then install by name with -d:
wsl --list --online
wsl --install -d DebianThe short form of the list command is wsl -l -o. You can install as many distributions as you like side by side. These commands manage them:
| Command | What it does |
|---|---|
wsl -l -v | list installed distros, whether they are running, and WSL 1 or 2 |
wsl --set-default Debian | make Debian the one plain wsl opens |
wsl --distribution Debian | open a distro without changing the default |
wsl ~ | start in your Linux home folder |
wsl --shutdown | stop every distro and the WSL 2 virtual machine |
wsl --update | update WSL itself |
wsl --status | show the default distro and kernel version |
wsl --unregister Debian | delete a distro and all its data |
Microsoft's warning on --unregister is blunt: all data, settings and software in that distribution "will be permanently lost". Back up first.
What is the difference between WSL 1 and WSL 2?
WSL 2 runs a real Linux kernel in a managed, lightweight virtual machine; WSL 1 translates Linux calls into Windows ones. Microsoft recommends WSL 2 for its speed and "100% system call compatibility", and it is what you get by default.
| Feature | WSL 1 | WSL 2 |
|---|---|---|
| Full Linux kernel | no | yes |
| Full system call compatibility | no | yes |
| systemd support | no | yes |
| Speed working on files across Windows and Linux | faster | slower |
| Runs with current VMware and VirtualBox | yes | no in Microsoft's table, though VMware 15.5.5 and later works |
Microsoft's own exceptions for picking WSL 1: your project files must stay on the Windows drive, you need a serial port, or you have strict memory limits. To switch one distro:
wsl --set-version Ubuntu 1
wsl --set-version Ubuntu 2Microsoft warns that switching can take a while and can fail on large distributions, so back up first.
How do you open Linux files from Windows, and Windows files from Linux?
Each side can see the other. From Linux, your Windows drives are mounted under /mnt, so C:\Users\you is /mnt/c/Users/you. From Windows, type \\wsl$ into File Explorer's address bar to see every distro's files, or run this inside Linux to open the current folder in Explorer:
explorer.exe .Commands also cross over. wsl ls -la runs a Linux command from PowerShell, and notepad.exe runs a Windows program from the Linux shell; Windows tools need their .exe extension.
For speed, Microsoft recommends keeping files on the side whose tools you use. Projects you work on from the Linux shell belong in /home/you/Project, not on /mnt/c. That matters for jobs like git clone and npm install, which Microsoft lists among the file-heavy operations WSL 2 speeds up.
Why does wsl --install fail?
Most failures come down to virtualization. From Microsoft's troubleshooting page:
- Error 0x80370102, "The virtual machine could not be started because a required feature is not installed." Enable virtualization in your PC's BIOS or UEFI (it is usually under CPU settings), turn on the Virtual Machine Platform optional feature, and restart. Then check the hypervisor in an administrator PowerShell:
bcdedit /enum | findstr -i hypervisorlaunchtypeIf it says Off, turn it back on and restart:
bcdedit /set hypervisorlaunchtype Auto- Error 0x80070003. Microsoft groups it with 0x80370102 under the same fix: make sure virtualization is enabled in the BIOS. WSL 2 also needs a CPU with Second Level Address Translation, so very old processors such as the Core 2 Duo cannot run it.
- Error 0x8007019e. The Windows Subsystem for Linux optional component is off. Turn it on under Turn Windows features on or off.
- The command prints help text instead of installing. WSL is already installed. Run
wsl --list --online, thenwsl --install -dwith a distro name. - The install hangs at 0.0%. Microsoft suggests
wsl --install --web-download -d Ubuntuto download the distro first.
What can you do once WSL is running?
Anything a Linux terminal can. Our Linux commands cheat sheet covers the everyday commands, and they all work inside WSL. Microsoft lists Docker among the apps WSL 2's full kernel makes possible; our guide to installing Docker on Ubuntu uses the same Ubuntu commands. To pull a project down from GitHub inside WSL, see how to clone a GitHub repo.
What is the catch?
WSL is a Linux command line first. It needs virtualization switched on, it uses a share of your RAM while it runs, and Microsoft notes that WSL 2 does not yet hand cached memory back to Windows until the instance shuts down, so wsl --shutdown helps on long sessions. Files stored on the Windows drive are slower to work with from Linux. And some hardware, such as serial ports, is out of reach in WSL 2.
Pull it. Stash it.
Questions people ask
How do I install WSL on Windows 11?
Right-click PowerShell, choose Run as administrator, type wsl --install and restart. Microsoft's docs say the command enables the features WSL needs and installs Ubuntu. When Ubuntu first opens, it unpacks its files and asks you to create a Linux user account and password.
How do I install a Linux distro other than Ubuntu?
Run wsl --list --online, or wsl -l -o, to see the distributions available, then wsl --install -d followed by the name, for example Debian. You can install several side by side and pick the default one with wsl --set-default followed by its name.
Should I use WSL 1 or WSL 2?
WSL 2 for almost everything. Microsoft recommends it for its real Linux kernel, full system call compatibility and faster file operations, and it is the default for new installs. WSL 1 is still faster when your project files must live on the Windows drive and you work on them from Linux.
What does error 0x80370102 mean when installing WSL?
It means a virtual machine could not start because a required feature is missing. Microsoft's fix is to enable virtualization in your PC's BIOS or UEFI settings, turn on the Virtual Machine Platform optional feature, restart, and check that the hypervisor launch type is not set to Off.
Is WSL the same as Bash for Windows?
WSL is how you get Bash on Windows today. Microsoft describes it as a Bash terminal on Windows run by the Linux distribution you choose. Microsoft lists the old bash launcher command among the deprecated commands that wsl has replaced, so open your distro or type wsl instead.
Sources
- 1Microsoft Learn: Install WSL (read 2026-11-22)
- 2Microsoft Learn: Basic commands for WSL (read 2026-11-22)
- 3Microsoft Learn: Comparing WSL versions (read 2026-11-22)
- 4Microsoft Learn: Working across file systems (read 2026-11-22)
- 5Microsoft Learn: Troubleshooting WSL (read 2026-11-22)
- 6microsoft/WSL
- 7microsoft/WSL releases
More repos like this
Get tomorrow's repo in your feed
One free, open source repo a day as a short video, shown working, with the catch named. Pull it. Stash it.
