Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update WSL shutdown instructions for clarity by specifying PowerShell should be run as administrator before executing the shutdown command. #2028

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions WSL/disk-space.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,13 @@ touch: cannot touch 'file': Read-only file system

To repair a disk mount error in WSL, and restore it back to a usable / writeable state again, you can use the `wsl.exe --mount` command to re-mount the disk with the following steps:

1. Shutdown all WSL distributions by opening PowerShell and entering the command:
1. Shutdown all WSL distributions by opening PowerShell as administrator (in an elevated command prompt) and entering the command:

```powershell
wsl.exe --shutdown
```

2. Open PowerShell as administrator (in an elevated command prompt) and enter the mount command, replacing `<path-to-ext4.vhdx>` with the path to the distribution's .vhdx file. For help locating this file, see [How to locate the VHD file and disk path for your Linux distribution](#how-to-locate-the-vhdx-file-and-disk-path-for-your-linux-distribution).
2. Enter the mount command and replacing `<path-to-ext4.vhdx>` with the path to the distribution's .vhdx file. For help locating this file, see [How to locate the VHD file and disk path for your Linux distribution](#how-to-locate-the-vhdx-file-and-disk-path-for-your-linux-distribution).

```powershell
wsl.exe --mount <path-to-ext4.vhdx> --vhd --bare
Expand Down