microsoft / microsoft/WSL

Persist /mnt/wsl mountpoints

Open
#5,851 10 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
C++
Stars
33.7k
Forks
1.8k
Avg merge
3d 17h
Merged PRs (30d)
116

Description

Is your feature request related to a problem? Please describe.

In WSL2, I'd like to be able to share my home directory between distros. So when Ubuntu (my main distro) comes up, it adds a symlink from /mnt/wsl/homeuser/ to /home/user, and when OpenSuse comes up, it also mounts from /mnt/wsl/homeuser/ to /home/user.

Describe the solution you'd like

I understand /mnt/wsl enables the sharing between distros but unfortunately /mnt/wsl uses tmpfs, so when wsl shutsdown you lose everything that was there.

Describe alternatives you've considered

I could host the files on my main distro (Ubuntu) and share from Ubuntu to /mnt/wsl/homeuser/, and when OpenSuse comes up, it does the opposite. Unfortunately, for that to occur, Ubuntu must come up first, and must stay up, consuming memory and cpu cycles.

Additional context

Initial request started at #5177. Also related to #689 and to a possible wsl --mount described in https://github.com/MicrosoftDocs/WSL/pull/824.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no implementation files, tests, or entry points. Start by reviewing related issues #5177 and #689 and the MicrosoftDocs proposal for the existing WSL mount design. Done would require a decided implementation that preserves /mnt/wsl mountpoint contents across shutdown and makes them available to multiple distros.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.