ArchWSL
ArchWSL copied to clipboard
Cannot change the default user with arch.exe
Describe the issue Error with strange text (shown below) was shown when trying to change the default user with "Arch.exe config --default-user".
C:\Arch>Arch.exe config --default-user ray
ERR: wsl: �hKm0R localhost �NtM�n
�FO*g\��P0R WSL0NAT !j_
N/ec localhost �Nt0
1000
&errors.errorString{s:"w\x00s\x00l\x00:\x00 \x00\xc0hKm0R \x00l\x00o\x00c\x00a\x00l\x00h\x00o\x00s\x00t\x00 \x00\xe3N\x06tM\x91n\u007f\f\xffFO*g\\\x95\xcfP0R \x00W\x00S\x00L\x00\x020N\x00A\x00T\x00 \x00!j\x0f_\vN\x84v \x00W\x00S\x00L\x00 \x00\rN/e\x01c \x00l\x00o\x00c\x00a\x00l\x00h\x00o\x00s\x00t\x00 \x00\xe3N\x06t\x020\r\x00\n\x001000"}
To Reproduce Install the package, set a new user and run above command in windows.
Expected behavior A change of default user of wsl.
Screenshots
Enviroment:
- Windows build number: [10.0.22631.3007]
- Security Software: Windows Defender
- WSL version 1/2: WSL2
- ArchWSL version: 22.10.16.0
- ArchWSL Installer type: zip
- Launcher version: wsldl2, version 22020900 (amd64)
Sloved.
Just disable the system proxy of Windows, and then the command could be executed. Still very strange. Is there a bug?
Setting wsl2.networkingMode
to mirrored
also solves the problem.
Here is my current .wslconfig
below.
[wsl2]
networkingMode=mirrored
dnsTunneling = true
autoProxy = true
[experimental]
autoMemoryReclaim = gradual
Adding the line networkingMode=mirrored
solves the problem.
LOL I edited .wslconfig before trying wsl -d Arch -u {username}
and succeeded. I thought the bug can be solved by an alternative way of adding default user before I read this issue