Skip to content

Instantly share code, notes, and snippets.

@jacricelli
Created May 18, 2022 23:56
Show Gist options
  • Select an option

  • Save jacricelli/cb8f088913ec39cbd8d83c66037e6c66 to your computer and use it in GitHub Desktop.

Select an option

Save jacricelli/cb8f088913ec39cbd8d83c66037e6c66 to your computer and use it in GitHub Desktop.

Revisions

  1. jacricelli created this gist May 18, 2022.
    11 changes: 11 additions & 0 deletions wsl-optimize-vhd
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    # https://github.com/microsoft/WSL/issues/4699#issuecomment-627133168
    #

    wsl --shutdown
    diskpart
    # open window Diskpart
    select vdisk file="C:\WSL-Distros\…\ext4.vhdx"
    attach vdisk readonly
    compact vdisk
    detach vdisk
    exit