Automatically share the filesystem of a distro with other WSL distros.
This is a systemd unit which automates the mounting of the distribution filesystem under the /mnt/wsl folder, which makes it available to other WSL distributions. It runs automatically when systemd starts. (See microsoft/WSL#4654 for how this works.)
Because I'm tired of doing it manually.
-
Set up the WSL Transdebian repository following the instructions here, if you have not already done so.
-
apt install wsl-share-fs
-
Either restart WSL, or
sudo systemctl start wsl-share-fs
.