Table of Contents

Windows Subsystem

Shrink

docker system prune -a --volumes
sudo apt clean
sudo fstrim -av

Then in PowerShell, run as Administrator (quit Docker Desktop first if it’s running):

wsl --shutdown
diskpart

At the DISKPART> prompt:

select vdisk file="C:\Users\alexander.friesen\AppData\Local\wsl\{0be58534-511e-420c-82e2-ffad792692c6}\ext4.vhdx"
attach vdisk readonly
compact vdisk
detach vdisk
exit

Reinstall

wsl --unregister "Legacy"
wsl --list --online
wsl --install -d Ubuntu-24.04 

Clone

wsl --export OriginalDistributionName FileName
wsl --import ClonedDistributionName InstallLocation FileName
wsl --distribution ClonedDistributionName

Visual Studio Code integration

https://code.visualstudio.com/docs/remote/wsl

start Visual Studio Code

code .

Watch the folder

https://stackoverflow.com/questions/69811903/angular-ng-build-watch-in-remote-containers-and-remote-wsl-not-detecting-file

    "ng": "ng",
    "start": "ng serve --poll 500",
    "build": "ng build",
    "watch": "ng build --watch --poll 500 --configuration development",
    "test": "ng test"