Skip to content
Happy Programming Guide
Start learning
Coding Tools

WSL Not Working After a Windows Update

Ubuntu will not open, wsl commands hang or error, or the distribution vanished after an update. The fixes in order: update WSL, re-enable the features, reset the network, recover the distro.

A ladybug hanging from a stem

A Windows update that leaves WSL broken usually does one of four things: leaves the WSL package behind the new Windows build, switches off the Virtual Machine Platform feature, breaks WSL’s virtual network, or, rarely, loses track of a distribution that is still on disk. The symptoms overlap — a terminal that opens and closes, an error code, a hang, or “no installed distributions” — but the checks below are quick and the fixes are ordered from most to least likely.

Step 1: update WSL#

Open PowerShell as administrator:

POWERSHELL
wsl --version
wsl --update
wsl --shutdown
wsl --status

WSL is delivered through the Microsoft Store and updates on its own schedule, so a Windows feature update can arrive with a kernel or a WSL version that no longer matches. wsl --update fixes the majority of post-update breakage on its own. If it fails or hangs, install the latest release from the Store or from the WSL GitHub releases page directly.

If wsl --version is not recognised at all, you have the old in-box WSL; wsl --install brings in the Store version.

Step 2: the Windows features#

Feature updates occasionally reset optional features. WSL 2 needs two:

POWERSHELL
dism.exe /online /get-featureinfo /featurename:VirtualMachinePlatform
dism.exe /online /get-featureinfo /featurename:Microsoft-Windows-Subsystem-Linux

If either says Disabled:

POWERSHELL
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

Then reboot. Errors mentioning the virtual machine could not be started, or asking you to enable the Virtual Machine Platform, are this.

Step 3: read the error code#

Message or code Meaning Fix
WSL_E_DEFAULT_DISTRO_NOT_FOUND No default distribution registered See recovering a distribution, below
HCS_E_HYPERV_NOT_INSTALLED, 0x80370102 Virtualisation is off Enable in firmware; enable the features above
0x80370114 or “operation could not be started because a required feature is not installed” Virtual Machine Platform disabled Step 2
0x8007019e, “The Windows Subsystem for Linux has not been enabled” WSL feature disabled Step 2
0x800701bc, “WSL 2 requires an update to its kernel component” Kernel out of date Step 1
Terminal opens and closes immediately Usually one of the above; the message flashes past Run wsl from PowerShell to see it

For firmware virtualisation, check with systeminfo | Select-String Virtualization; a No means it must be enabled in the BIOS or UEFI settings, which a Windows update can occasionally reset on some machines.

Step 4: networking inside WSL#

After some updates, WSL starts but has no network: apt update fails, ping times out, DNS does not resolve. Try, in order:

POWERSHELL
wsl --shutdown
Get-NetAdapter | Where-Object Name -like "*WSL*"      # the virtual adapter should be present
Terminal
# inside WSL
cat /etc/resolv.conf
sudo bash -c 'echo "nameserver 1.1.1.1" > /etc/resolv.conf'

If the DNS fix works, make it stick with generateResolvConf = false under [network] in /etc/wsl.conf. VPN clients are the other common culprit: their update, or Windows’, changes the network stack, and WSL’s adapter loses out. Switching WSL to mirrored networking in %USERPROFILE%\.wslconfig often resolves VPN conflicts on current builds:

Output
[wsl2]
networkingMode=mirrored

Followed by wsl --shutdown.

Step 5: a distribution that disappeared#

POWERSHELL
wsl -l -v

If your distribution is missing but its files are still on disk, it can be re-registered. The virtual disk lives under your user profile, typically %LOCALAPPDATA%\Packages\CanonicalGroupLimited...\LocalState\ext4.vhdx for Store-installed Ubuntu. Import it:

POWERSHELL
wsl --import-in-place Ubuntu "C:\path\to\ext4.vhdx"
wsl --set-default Ubuntu

Your files, packages and home directory are inside that disk, so an import brings everything back. Do this before considering a reinstall, which would create an empty distribution.

Step 6: Docker Desktop and other dependents#

Docker Desktop, some IDEs and various tools run on top of WSL. Once WSL itself works from PowerShell, restart those applications; they usually recover without further action. If Docker still complains, its own troubleshooting menu has a restart option that recreates its WSL distributions.

When nothing works#

  1. Back up: wsl --export or copy the vhdx.
  2. Uninstall WSL from Settings, Apps, then reboot.
  3. wsl --install, reboot, and import the backup.

This is rarely necessary and takes fifteen minutes when it is. The steps above cover most cases in one or two commands.

Questions people ask#

Why does a Windows update break WSL at all?

WSL depends on the hypervisor, optional features and a kernel that all ship in different channels. An update to one can leave another behind until you run wsl --update.

Is WSL 1 affected the same way?

WSL 1 does not use the virtual machine, so the feature and kernel problems do not apply. Networking and distribution registration issues can still occur.

My files are on the Windows side; are they safe?

Yes. Files under /mnt/c are your Windows files and are untouched by WSL problems. Files inside the WSL home directory live in the vhdx, which is why backing it up matters.

Can I stop Windows updating WSL?

You can defer feature updates in Windows Update settings, and the Store version of WSL can be updated manually rather than automatically. Staying current is generally less trouble than pinning.

Where to go next#

WSL for beginners: Linux inside WindowsRead next

Keep reading

Keep going — pick your next guide

The fastest way to improve is to read one guide, then build the thing it describes. Start with the basics, or jump straight to a project.

Ask a question or share what worked

Your email address will not be published. Required fields are marked *