47

I have been using Windows 10's Windows Subsystem for Linux bash (Ubuntu via Microsoft Store) in the last few weeks, no problem, awesome feature, couldn't be happier.

But today it suddenly stopped working. Typing bash just does nothing on the command line (cmd and PowerShell), as if it would be waiting for something. It doesn't crash or output an error message, but just keeps showing a blinking cursor.

enter image description here

(Cursor not visible on screenshot, it is a blinking _ on the next line after bash)

Task manager shows both command lines at 0% CPU with a "Microsoft Bash Launcher" process also at 0% CPU:

enter image description here

Any idea how to debug and fix this?

Update: After a few manual restarts and one "crash" (I think explorer.exe stopped, and didn't really come back after killing the process after a prompt) it now works again for now.
I had the problem a few weeks before (where I fixed it be reinstalling WSL), so I assume it will reappear sooner or later.

11
  • I would uninstall and reinstall WSL Ubuntu, I normally would suggest you reset it, but that requires a working instance.
    – Ramhound
    Dec 8, 2017 at 20:04
  • Some really smart folks seems to have found a solution to the problem. Check out the solution here.
    – Vinayak
    Dec 8, 2017 at 20:15
  • In order to uninstall the WSL you have to use wsl-config
    – Ramhound
    Dec 8, 2017 at 20:29
  • Is wsl.exe working?
    – Biswapriyo
    Dec 9, 2017 at 8:02
  • @Biswa No, exact same behaviour for wsl.exe and ubuntu. Also when running PowerShwell or cmd as Administrator.
    – janpio
    Dec 9, 2017 at 15:26

2 Answers 2

51

Try to do a full reboot of Windows10, hold Shift, and click “Restart.”

Normal reboot/shutdown action in the start menu will not shutdown Windows 10 fully, for the “fast boot” mechanism saves memory from the last session. The other answer mentioned changing system settings which make Windows 10 doing a full reboot, it works, but unnecessary.

By holding the Shift key and click the “Restart” in the start menu, Windows 10 will go into advanced restart mode, choose “Shutdown” from the menu. Then start normally again.

10
  • 4
    Thank you for this! I didn't have to change any settings, and this worked for me.
    – Archenoth
    Sep 17, 2019 at 20:33
  • 1
    Worked for me too. I wish they fix this though Oct 30, 2019 at 1:09
  • 1
    I got into maintain mode and clicked the special shutdown button, but when I booted back up bash still wouldn't start. Dec 18, 2019 at 17:37
  • 4
    Sure, reboot every time it gets stuck. Classic windows xD
    – Danny Lo
    Mar 9, 2020 at 22:43
  • 3
    Thank You! It worked! Posted this issue on GH: github.com/microsoft/WSL/issues/5503 Jun 29, 2020 at 7:17
12

As discussed on https://github.com/Microsoft/WSL/issues/849 by user imkimchi the steps for solving this issue are:

  1. Run windows + R
  2. type SystemPropertiesAdvanced
  3. click settings in performance group
  4. In advanced tab, click Change under Virtual Memory and deselect the automatically manage paging file size for all drives
  5. Select custom size and enter 800 for initial size, 1024 for maximum size.
  6. Apply changes and restart.
3
  • 3
    This is not a complete solution. I suspect changing the page file management itself causes WSL to start working again. Mine got stuck, and I got it working after reading this answer, but then after a month or so, it got stuck again. I reverted my virtual memory to "System Managed", and WSL started working again. I don't know what to make of it :-|
    – kumarharsh
    Apr 3, 2019 at 6:55
  • 1
    When I went to this window I already had almost 32gb of RAM allocated... so I think this is not the solution.
    – Jim
    Oct 26, 2020 at 13:48
  • When I restart my PC, my WSL instance usually starts working again without having to change this. ¯\_(ツ)_/¯
    – Qwerty
    Feb 23 at 17:31

Not the answer you're looking for? Browse other questions tagged or ask your own question.