microsoft / microsoft/WSL

Add systemdCommandLine to /etc/wsl.conf

Open
#9,086 0 comments 1 reaction 0 assignees View on GitHub
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.**

There are a number of systemd command line options that are typically (under native Linux) passed along to it by specifying them on the kernel command line; see _systemd(1)_ for details. Since this is impossible under WSL (options specified in the `.wslconfig` _kernelCommandLine_ option are passed on to the _init_ of the WSL root distribution, and do not trickle down to the WSL instance), these options are not currently available under WSL.

**Describe the solution you'd like**

There should be a _systemdCommandLine_ option available in `/etc/wsl.conf` along the same lines as the existing _kernelCommandLine_ option in `.wslconfig`, which is appended to the _systemd_ command line when starting a WSL instance rather than the kernel command line.

**Describe alternatives you've considered**

While some of these options have alternatives in various configuration files, etc., others do not.

**Additional context**
Add any other context or screenshots about the feature request here.

Contributor guide

Open the contributing guide

Research direction

Start by tracing how the existing kernelCommandLine option in .wslconfig is handled and how /etc/wsl.conf is parsed. The requested change is complete when a systemdCommandLine option from /etc/wsl.conf is appended to the systemd command line, rather than passed only to the WSL init.

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
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.