Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.wslconfig doesn't work: Unknown key ... #10510

Closed
1 of 2 tasks
yh-sb opened this issue Sep 20, 2023 · 3 comments
Closed
1 of 2 tasks

.wslconfig doesn't work: Unknown key ... #10510

yh-sb opened this issue Sep 20, 2023 · 3 comments

Comments

@yh-sb
Copy link

yh-sb commented Sep 20, 2023

Windows Version

Microsoft Windows [Version 10.0.22621.2283]

WSL Version

2.0.0.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.123.1-microsoft-standard-WSL2

Distro Version

Ubuntu 22.04

Other Software

No response

Repro Steps

Remove /etc/wsl.conf file.
wsl --shutdown
Create .wslconfig file in C:\Users\<UserName> with the following content:

[boot]
systemd=true

[interop]
# Restrict launching Windows processes in WSL
enabled=false

# Do not appent Windows PATH to WSL $PATH
appendWindowsPath = false

NOTE: there is another issue that .wslconfig file should have LF line endings. Otherwise, with CRLF, it doesn't work in my setup.

Start the WSL and see output in Terminal:

wsl: Unknown key 'boot.systemd' in C:\Users\root\.wslconfig:2
wsl: Unknown key 'interop.enabled' in C:\Users\root\.wslconfig:6
wsl: Unknown key 'interop.appendWindowsPath' in C:\Users\root\.wslconfig:9

Also, see that, for example, docker inside WSL isn't accessible because systemd doesn't start due to broken .wslconfig.
Windows or WSL reboot doesn't fix this problem.

Expected Behavior

WSL configuration successfully loaded from C:\Users\<UserName>\.wslconfig file.

Actual Behavior

Errors when loading WSL configuration from C:\Users\<UserName>\.wslconfig file.

Diagnostic Logs

No response

@yh-sb
Copy link
Author

yh-sb commented Sep 20, 2023

Or did I misunderstand something and the /etc/wsl.conf and C:\Users\<UserName>\.wslconfig configuration keys are not compatible?

@0xbadfca11
Copy link

.wslconfig is not a globalization of wsl.conf.

@yh-sb
Copy link
Author

yh-sb commented Sep 20, 2023

Understood. So, closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants