Why does /etc/wsl.conf get overwritten in some WSL distributions?

Mike 5 Reputation points
2023-03-31T11:36:04.36+00:00

Yesterday after running a 'wsl --update' (due to this issue (https://learn.microsoft.com/en-us/answers/questions/1194533/how-to-resolve-wsl-service-createinstance-0x800403) I started seeing some of my distros startup in a very odd ways. It seems like the /etc/wsl.conf file is getting overwritten with this:

PS D:\wslsandbox> wsl -d LMTECH-18754 cat /etc/wsl.conf

[boot]

command=/usr/bin/WSLGd

[user]

default=wslg

PS D:\wslsandbox>

Where could this be coming from? What I originally have is something like this:

[boot]

systemd=true

[user]

default=XXXXX

[interop]

appendWindowsPath=false

What is incredibly strange is this happened on a brand new distro just created as well as one that had been install and I've been using for well over a year and the old distro "fixed itself" after a some cycles of terminate and restarting.

Where could this /etc/wsl.conf be coming from? I have nothing that would put that in nor any reason/knowledge for this kind of setup.

Windows for business Windows Client for IT Pros User experience Other
{count} vote

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.