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

systemctl still can't run in latest version wsl #12729

Open
1 of 2 tasks
richen666 opened this issue Mar 22, 2025 · 6 comments
Open
1 of 2 tasks

systemctl still can't run in latest version wsl #12729

richen666 opened this issue Mar 22, 2025 · 6 comments

Comments

@richen666
Copy link

Windows Version

10.0.26100.3476

WSL Version

2.4.12.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.167.4-1

Distro Version

Ubuntu-24.04

Other Software

No response

Repro Steps

$wsl --version
WSL Version: 2.4.12.0
Kernel Version: 5.15.167.4-1
WSLg Version: 1.0.65
MSRDC Version: 1.2.5716
Direct3D Version: 1.611.1-81528511
DXCore Version: 10.0.26100.1-240331-1435.ge-release
Windows Version : 10.0.26100.3476

$systemctl
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down

Expected Behavior

sudo systemctl daemon-reload
sudo systemctl restart docker

I just used systemctl to restart docker, but it stopped everything.

Actual Behavior

$cat /etc/wsl.conf
[boot]
systemd=true
[network]
generateResolvConf=false
[user]
default=richen
As you can see, I have already set boot in wsl.conf and restart wsl by "wsl --shutdown", but nothing useful.

Diagnostic Logs

No response

Copy link

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'.
Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs

Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The script will output the path of the log file once done.

If this is a networking issue, please use collect-networking-logs.ps1, following the instructions here

Once completed please upload the output files to this Github issue.

Click here for more info on logging
If you choose to email these logs instead of attaching to the bug, please send them to wsl-gh-logs@microsoft.com with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

@richen666
Copy link
Author

WslLogs-2025-03-22_22-02-58.zip
This is wsl log, please check.

Copy link

The log file doesn't contain any WSL traces. Please make sure that you reproduced the issue while the log collection was running.

Diagnostic information
.wslconfig found
Detected appx version: 2.4.12.0
Found no WSL traces in the logs

@richen666
Copy link
Author

Image
here, the red box, when I just inputed any key in keyboard, it run and stored at once. So I can't run any commands to reproduce this problem.

@richen666
Copy link
Author

Anyone is here? How can I get the log? Just open newly a Windows powershell as a user, and start wsl and again run former commands, and the running collect-wsl-logs.ps1 will collect the information about the problem?

@Samyouell
Copy link

just here to say i'm also struggling because systemctl used to work and is now broken for me.

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