Skip to main content
The 2026 Annual Developer Survey is live— take the Survey today!.

Timeline for answer to Can't restart/shutdown Ubuntu under WSL by NotTheDr01ds

Current License: CC BY-SA 4.0

Post Revisions

8 events
when toggle format what by license comment
Jul 20, 2025 at 12:19 history edited NotTheDr01ds CC BY-SA 4.0
Added a tl;dr and fixed a few outdated-things (and a typo)
Jul 18, 2025 at 19:10 comment added ichthyophile +1 for shutdown timer information. Very helpful. I was worried Ctrl+D wasn't going to be enough to stop background resource use, but I confirmed with wsl -l -v that it exists after a few seconds.
Nov 14, 2022 at 13:10 history edited NotTheDr01ds CC BY-SA 4.0
Reworked - More recent information and better (hopefully) explanations on some parts
Nov 13, 2022 at 17:13 history edited NotTheDr01ds CC BY-SA 4.0
Edited based on recent Systemd-support in WSL
Aug 10, 2022 at 16:22 history edited NotTheDr01ds CC BY-SA 4.0
Clarified wording on Systemd and add .exe to wsl command invocations so that they will run inside WSL itself.
Nov 17, 2021 at 0:47 comment added NotTheDr01ds @PeterWone Well, sort of. You make a good point about Docker continuing to consume memory, but (a) that's a corner case (not even covered by this particular question), and (b) it's actually not the Ubuntu instance which is consuming the memory; it's the docker-desktop one. As per my answer, the Ubuntu instance will terminate (and release its memory) when no processes are running inside it, but the docker-desktop instance is still running until you manually stop either Docker Desktop, wsl --terminate docker-desktop, or wsl --shutdown.
Nov 16, 2021 at 23:52 comment added Peter Wone When Docker for Win uses WSL it consumes virtual memory, often quite a lot. When you shut down the container, this isn't released because it is held by Ubuntu which is still running. wsl --shutdown 0 gets your RAM back.
Jul 22, 2021 at 1:07 history answered NotTheDr01ds CC BY-SA 4.0