How exactly does one install Ubuntu on Windows Subsystem for Linux?

Ubuntu Version

Ubuntu 26.04 LTS

Desktop Environment (if applicable)

Other

Problem Description

I’m trying to install Windows Subsystem for Linux on Windows 11.

I run into problems.

Here’s what I’ve done and what happens.

One

  • Ensure that Windows is fully up-to-date.
  • Restart the computer (because Windows likes that after updates).

Two

Three

Four

Five

  1. Windows fails to boot.
  2. It gives me recovery options.
  3. Whichever option I take, go back to step 1.


Thank heavens this is on a VM (virtual machine), so I am able to restore to a working snapshot.

Relevant System Information

  • Host: Ubuntu 24.04.
  • Guest: Windows 11 Home, EFI, Secure Boot, TPM 2 chip (in VirtualBox).
  • Ubuntu in Microsoft Store version 26.04.1.


Screenshots






What I’ve Tried

Restore to a working snapshot, and try again.

Paddy, my friend, let’s talk like adults - why do you even need this Windows? :grinning_face:

1 Like

Your Windows fails to boot after installing WSL, before it did anything with Ubuntu. It is really something you would need to ask on the Windows forums or WSL Github project.

I’m using WSL on Windows 10, I have not encountered this particular problem.

1 Like

That’s funny, Viktor!

Every month, I test my disaster recovery procedure — should my phone be stolen, my house destroyed in a fire, and the only way back to my data is to access my online backup through a friend’s Windows computer, can I do it?

Well, no, not if Ubuntu bricks Windows!

OK. I was hoping that the enormous range of experience on this forum would have something. :frowning:

I’ve just reread this. Isn’t WSL the bit in step Two, where I enable Windows Subsystem for Linux? Because that was fine; I restarted after doing that without problem.

It was only after installing Ubuntu from the Microsoft Store when the problem started.

As your screenshot shows, it says “Windows Subsystem for Linux is not installed” when you attempt to install Ubuntu.

@paddylandau
Is this something to do with Nested VM?
Possibly a Virtualbox config setting?

You might be talking about the VirtualBox setting “Nested VT-x/AMD-V”, which needs to be turned on in order to run a VM within a VM. This is indeed turned on.

1 Like

Ah. Thank you. I don’t understand how that works, but testing this on a tiny step by step process, I believe that you are correct.

Did you reboot after enabling Windows Subsystem for Linux here? IIRC that’s a required step.

I did indeed. That’s what confused me. Maybe Windows needs a double-restart. That’s kind of normal for Windows, so I wouldn’t be surprised.

1 Like

I use Ubuntu on Windows via WSL. I do not remember now if I downloaded it (originally) from MS store. I have removed and reinstalled several times since. Now I only do,

wsl --install

for default (Ubuntu latest LTS) and if a different release/distro is needed then (as an example),

wsl --install --distribution Ubuntu-24.04 --name noble-wsl

Worked fine so far.

1 Like

Thanks, @suivue. Unfortunately, that ends up with the same problem for me :frowning:

1 Like

Hmm. I don’t know if Windows version/updates can be an issue. I’m on Version 25H2, OS Build 26200.9457. There is an update offered 26H2 but I haven’t installed it (all I see is AI-that, AI-this…).

Also, it seems wsl --install now automatically takes care of configuring Windows (virtualization etc.). So, if you still have issue, undo everything and just use that command from a PowerShell may be?!

Also, on my machine, I don’t have ‘Windows Subsystem for Linux’ enabled. Instead I have ‘Virtual Machine Platform’ and ‘Windows Hypervisor Platform’ enabled.

For WSL version 2, you may have to also enable Virtual Machine Platform in Windows Features

1 Like

That’s … weird. You don’t have WSL enabled for WSL. :red_question_mark:

  • I tried enabling Windows Machine Platform. Same problem.
  • I tried enabling Windows Hypervisor Platform. Same problem.
  • I tried enabling all three. Same problem.

There must be something specific to my system that’s messing things up.

I would guess that it is a Virtualbox configuration somewhere?


I use qemu/kvm to run VMs and I’ve just installed wsl via powershell
It took me longer to find the instructions to download and launch Ubuntu 26.04 than to install wsl itself within Windows 11 VM

wsl --install
wsl --install -d ubuntu-26.04

wsl --install only enabled one Windows Feature i.e. Virtual Machine Platform

Could you run the following in PowerShell as Administrator and post the complete output?

wsl --status
wsl --version
wsl --list --online
wsl --list --verbose

Also check whether virtualization is actually enabled:

systeminfo

At the end of the output, look at Hyper-V Requirements and see whether it reports that a hypervisor has been detected.

I would also check the optional features with:

Get-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux,VirtualMachinePlatform,HypervisorPlatform
1 Like

The install guide in the Ubuntu on WSL docs indicates that virtualization and virtual machine platform need to be enabled before you can install Ubuntu on WSL. Running wsl --install for the first time should enable virtual machine platform but a reboot is normally required.

As others have noted, if you are doing nested virtualization, additional steps may be required in your VM software/hypervisor to enable that.

There is also this note in the docs:

The effect of wsl --install may vary depending on your system. After installation, a reboot is usually required before WSL distros can be installed. If those WSL components are already enabled, a reboot may not be required and an installation of the default Ubuntu distribution will be attempted.

For example, if VMP is not enabled, wsl --install will enable it but a reboot may be required for it to work. If you then reboot and run wsl --install again (yes, the same command), the default distro (currently Ubuntu 26.04) will install. If you try to do something like wsl --install (to enable the necessary virtualization components) and then immediately wsl --install Ubuntu-26.04 (without a reboot) there can be errors.

I’m cc’ing @cnihelton from the Ubuntu on WSL team who I know does a lot of WSL work with nested virtualization.

1 Like