microsoft / microsoft/WSL

Mount a Linux disk in WSL 2 automatically on WSL 2 start via .wslconfig

Open
#8,010 0 comments 18 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

At the moment it is possible to mount Linux disk in WSL 2 only manually, by running:

wsl --mount ...

It is not very convinient when this disk should be always available since additional command has to be run.

A workaround could be adding wsl --mount in Task Scheduler on Windows log-in, but this won't help when WSL is restarted. And, there is still seems to be a fraction of time after log-in and before task triggered when WSL could be run with no disk mounted.

Mount support via .wslconfig should help here.

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

Start by reviewing the existing wsl --mount behavior and how .wslconfig settings are handled. Define the configuration needed to mount a Linux disk automatically when WSL 2 starts, with the disk available without a separate command.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, linux
Domain
operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.