Feature Request: System-Level (Machine-Wide) WSL Distribution Installation
- Dominant language
- C++
- Stars
- 33.7k
- Forks
- 1.8k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 116
Description
### Problem Statement
Currently, WSL distributions are installed per-user, with configurations stored in `HKEY_CURRENT_USER` and VHD files in user-specific directories. This means each Windows user on the same machine must:
- Download and install their own copy of the same distribution
- Maintain separate VHD files, consuming additional disk space
- Individually configure and update their distributions
This is inefficient for enterprise and multi-user scenarios.
### Proposed Solution
Implement a **system-level installation option** for WSL distributions, similar to VS Code's "System" install mode:
1. **Shared Base Image**: A single read-only distribution stored in a system-wide location (e.g., `C:\ProgramData\WSL\Distributions\`)
2. **Per-User Writable Layer**: Each user gets a copy-on-write overlay for their modifications
3. **New CLI Options**:
```bash
wsl --install --system
wsl --import --system
```
### Use Cases
- **Enterprise Deployment**: IT admins deploy pre-configured Linux environments to all workstations
- **Educational Labs**: Multiple students sharing the same machine
- **Disk Space Optimization**: Avoid duplicating large distribution images across user profiles
### Additional Context
This feature would significantly improve WSL adoption in enterprise and multi-user environments. Happy to provide additional details if needed.
Contributor guide
Research direction
Start by tracing the existing `wsl --install` and `wsl --import` entry points and how they store distributions, configuration, and VHD files. Define the system-wide base location, per-user writable layer, permissions, lifecycle, and compatibility for both commands; done means both options support multi-user installations without duplicating the base distribution.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli, operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100