Add systemdCommandLine to /etc/wsl.conf
- 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
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