Question: So, I've been using the new(ish) Bash on Ubuntu on Windows (WSL) for a while now and all has been top-notch, until yesterday. 

I git-pushed from Bash by accident, so it asked me for my repo-destination account details like normal. I decided to ignore this, terminate Bash and try to just use powershell instead (can't ever remember passwords!). Terminating Bash however caused the shell to freeze. I forced closed and restarted my comp (I've had to force close and restart several times before for various reasons and everything was fine).

After boot up, I just tried to check if Bash was working again, but it wasn't. It just failed to start with no error message. For example:

```
PS C:\WINDOWS\system32> bash
PS C:\WINDOWS\system32>

```

Has anyone else had a similar situation/knows how to help?

EDIT: Only solved through reinstalling bash, using

```
    lxrun /uninstall /full

```

then 

```
    lxrun /install 

```

Answer: 
The solutions listed also did not work for me. I found a solution [here](https://github.com/Microsoft/WSL/issues/849#issuecomment-252053937).

Essentially, navigate to `Control Panel > System > Advanced System Settings > Advanced > Settings > Advanced > Virtual memory, Change ...`, and set a Custom size for the paging file size: 800 min and 1024 max. Restarted, and the command prompt came back.
Section i: other error messages.
--------------------------------

* This error is **closely followed** by a second error, code **0x80070057 (see section 2)**!
* This error ***also manifests*** as "**Windows Subsystem for Linux has no installed distributions. Distributions can be installed by visiting the Microsoft Store: <https://aka.ms/wslstore>**" by typing `Bash` at cmd/powershell. Use **Section 1 then Section 2**.

Section ii: verify your installation and restart.
-------------------------------------------------

*Be sure* that **WSL (Windows Subsystem Linux) is checked/installed** and your computer had a **proper restart**: `{⊞START}` → type "`features`" (ensure "Turn Windows features on or off" is selected). → `{ENTER}`. → Turn Windows Subsystem for Linux on. → Press OK. → Restart your computer immediately after the installation has finished.

Section 1a: Install Linux [via the Microsoft Store].
----------------------------------------------------

1. Press `{⊞START}` on your keyboard.
2. Type "`store`" ensure "Microsoft Store" is selected. → `{ENTER}}`.
3. `{SHIFT}-{TAB}` twice (highlight search). → `{ENTER}`.
4. type "`subsystem`". → `{ENTER}`.
5. Select your flavor of Linux (i.e., "Ubuntu LTS 18.04") and click "Install".
6. `{⊞START}`. -> Type "`ubuntu`" (ensure Ubuntu App is selected). → `{ENTER}`.

Section 1b: Side-load Linux.
----------------------------

\*This is a placeholder--you can manually install WLS--<https://learn.microsoft.com/en-us/windows/wsl/install-manual>. I have not done this, yet. If you have done this, please add instructions by editing my answer; otherwise, I will post this section after performing this operation myself.

Section 2: if launching Ubuntu throws 'WslRegisterDistribution failed with error: 0x80070057'\*\*
-------------------------------------------------------------------------------------------------

*After installing a linux flavor*:

1. `{⊞START}` → type "`features`" (ensure "Turn Windows features on or off" is selected). → `{ENTER}`.
2. Turn Windows Subsystem for Linux off. → Press OK.
3. Turn Windows Subsystem for Linux on.
4. Restart your computer.
5. `{⊞START}`. → type "`ubuntu`" (ensure "Ubuntu App" is selected). → `{ENTER}`

\*\*This is the most-accepted solution for this issue is the last answer on page two at [Microsoft Answers](https://answers.microsoft.com/en-us/windows/forum/apps_windows_10-winapps-appscat_tools/how-to-resolve-wslregisterdistribution-failed-with/0b218e4d-581e-4a60-9392-626cb19d20d2?page=2).