Skip to content

Commit 8b22f05

Browse files
Clarified text on wsl2-mount-disk.md
1 parent 05e20f9 commit 8b22f05

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

WSL/wsl2-mount-disk.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,10 @@ If `Diskpath` is omitted, all attached disks are unmounted and detached.
167167
168168
## Mount a VHD in WSL
169169

170-
You can also mount virtual hard disk files (VHD) into WSL using `wsl --mount`. To do this, you first need to mount the VHD into Windows using the [`Mount-VHD`](https://docs.microsoft.com/powershell/module/hyper-v/mount-vhd) command in Windows. Be sure to run this command in a window with administrator privileges. Below is an example where we use this command, and also output the disk path
170+
You can also mount virtual hard disk files (VHD) into WSL using `wsl --mount`. To do this, you first need to mount the VHD into Windows using the [`Mount-VHD`](https://docs.microsoft.com/powershell/module/hyper-v/mount-vhd) command in Windows. Be sure to run this command in a window with administrator privileges. Below is an example where we use this command, and also output the disk path. Be sure to replace `<pathToVHD>` with your actual VHD path.
171171

172172
```powershell
173-
Write-Output "\\.\PhysicalDrive$((Mount-VHD -Path .\ext4.vhdx -PassThru | Get-Disk).Number)"
173+
Write-Output "\\.\PhysicalDrive$((Mount-VHD -Path <pathToVHD> -PassThru | Get-Disk).Number)"
174174
```
175175

176176
You can use the output above to obtain the disk path for this VHD and mount that into WSL following the instructions in the previous section.

0 commit comments

Comments
 (0)