Step 1
Find the name of your instance:
wsl -l -v
learn.microsoft.com/en-us/windows/wsl/basic-commands#list-installed-linux-distributions
Step 2
wsl --export <instance name> $(date '+%Y-%m-%d-%H-%M').tar
E.g.:
wsl --export Ubuntu-22.04 $(date '+%Y-%m-%d-%H-%M').tar
- learn.microsoft.com/en-us/windows/wsl/basic-commands#import-and-export-a-distribution
- learn.microsoft.com/en-us/windows/wsl/enterprise#distributing-your-wsl-image
wsl --export
stops the instance.
How to start a stopped WSL instance?