linux

determine which process is listening on a port

sudo netstat -ltnp | grep -w ':80' 

docker disk usage

Find large directories

du -ah / | sort -h -r | head -n 20

Find containers using a given volume

docker ps -a --filter volume=<volume>

Remove container and its associated volume

docker rm -v container

See total volume, image, container space

docker system df

See space used per volume

docker system df -v

Remove dangling volumes from disk

docker volume prune

filesystem performance is slow

workaround

Prefer ~/ over /mnt when filesystem performance is needed

wsl uses all the ram

workarounds

yolo

Force linux to drop the page cache

echo 1 | sudo tee /proc/sys/vm/drop_caches

limit memory assigned to WSL2 VM

Create a %UserProfile%\.wslconfig file

[wsl2]
memory=6GB
swap=0
localhostForwarding=true