Skip to main content
As of 1.0.0 last year, it runs under Windows 10 as well.
Source Link
NotTheDr01ds
  • 23.6k
  • 6
  • 70
  • 112

If you have Windows 11 anda recent WSL release from the Microsoft StoreMicrosoft Store then systemdSystemd can be used. Once eacha WSL instance is running systemdSystemd, create a mount file such as:

/etc/systemd/system/mnt-wsl-instances-${WSL_DISTRO_NAME}

[Unit]
Description=WSL Instances

[Mount]
What=/
Where=/mnt/wsl/instances/${WSL_DISTRO_NAME}
Type=none
Options=defaults,bind,X-mount.mkdir

[Install]
WantedBy=multi-user.target

And then enable the mount:

sudo systemctl daemon-reload

sudo systemctl enable mnt-wsl-instances-${WSL_DISTRO_NAME}.mount --now

All WSL files are available at /mnt/wsl/instances.

If you have Windows 11 and WSL from the Microsoft Store then systemd can be used. Once each WSL instance is running systemd, create a mount file such as:

/etc/systemd/system/mnt-wsl-instances-${WSL_DISTRO_NAME}

[Unit]
Description=WSL Instances

[Mount]
What=/
Where=/mnt/wsl/instances/${WSL_DISTRO_NAME}
Type=none
Options=defaults,bind,X-mount.mkdir

[Install]
WantedBy=multi-user.target

And then enable the mount:

sudo systemctl daemon-reload

sudo systemctl enable mnt-wsl-instances-${WSL_DISTRO_NAME}.mount --now

All WSL files are available at /mnt/wsl/instances.

If you have a recent WSL release from the Microsoft Store then Systemd can be used. Once a WSL instance is running Systemd, create a mount file such as:

/etc/systemd/system/mnt-wsl-instances-${WSL_DISTRO_NAME}

[Unit]
Description=WSL Instances

[Mount]
What=/
Where=/mnt/wsl/instances/${WSL_DISTRO_NAME}
Type=none
Options=defaults,bind,X-mount.mkdir

[Install]
WantedBy=multi-user.target

And then enable the mount:

sudo systemctl daemon-reload

sudo systemctl enable mnt-wsl-instances-${WSL_DISTRO_NAME}.mount --now

All WSL files are available at /mnt/wsl/instances.

deleted 2 characters in body
Source Link

If you have Windows 11 and WSL from the Microsoft Store then systemd can be used. Once each WSL instance is running systemd, create a mount file such as:

/etc/systemd/system/mnt-wsl-instances-${WSL_DISTRO_NAME}

[Unit]
Description=WSL Instances

[Mount]
What=/
Where=/mnt/wsl/instances/${WSL_DISTRO_NAME}
Type=none
Options=defaults,bind,X-mount.mkdir

[Install]
WantedBy=multi-user.target

And then enable the mount:

sudo systemctl daemon-reload
sudo systemctl enable mnt-wsl-instances-${WSL_DISTRO_NAME}.mount --now

sudo systemctl daemon-reload

sudo systemctl enable mnt-wsl-instances-${WSL_DISTRO_NAME}.mount --now

All WSL files are available at /mnt/wsl/instances.

If you have Windows 11 and WSL from the Microsoft Store then systemd can be used. Once each WSL instance is running systemd, create a mount file such as:

/etc/systemd/system/mnt-wsl-instances-${WSL_DISTRO_NAME}

[Unit]
Description=WSL Instances

[Mount]
What=/
Where=/mnt/wsl/instances/${WSL_DISTRO_NAME}
Type=none
Options=defaults,bind,X-mount.mkdir

[Install]
WantedBy=multi-user.target

And then enable the mount:

sudo systemctl daemon-reload
sudo systemctl enable mnt-wsl-instances-${WSL_DISTRO_NAME}.mount --now

All WSL files are available at /mnt/wsl/instances.

If you have Windows 11 and WSL from the Microsoft Store then systemd can be used. Once each WSL instance is running systemd, create a mount file such as:

/etc/systemd/system/mnt-wsl-instances-${WSL_DISTRO_NAME}

[Unit]
Description=WSL Instances

[Mount]
What=/
Where=/mnt/wsl/instances/${WSL_DISTRO_NAME}
Type=none
Options=defaults,bind,X-mount.mkdir

[Install]
WantedBy=multi-user.target

And then enable the mount:

sudo systemctl daemon-reload

sudo systemctl enable mnt-wsl-instances-${WSL_DISTRO_NAME}.mount --now

All WSL files are available at /mnt/wsl/instances.

Source Link

If you have Windows 11 and WSL from the Microsoft Store then systemd can be used. Once each WSL instance is running systemd, create a mount file such as:

/etc/systemd/system/mnt-wsl-instances-${WSL_DISTRO_NAME}

[Unit]
Description=WSL Instances

[Mount]
What=/
Where=/mnt/wsl/instances/${WSL_DISTRO_NAME}
Type=none
Options=defaults,bind,X-mount.mkdir

[Install]
WantedBy=multi-user.target

And then enable the mount:

sudo systemctl daemon-reload
sudo systemctl enable mnt-wsl-instances-${WSL_DISTRO_NAME}.mount --now

All WSL files are available at /mnt/wsl/instances.