2 분 소요

wsl 사용시 systemctl 명령어 먹히지 않을때

아래와 같이 systemctl 명령어가 먹히지 않을 때

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

아래 두 명령어를 차례로 입력해주면 된다.

sudo -b unshare --pid --fork --mount-proc /lib/systemd/systemd --system-unit=basic.target
sudo -E nsenter --all -t $(pgrep -xo systemd) runuser -P -l $USER -c "exec $SHELL"

댓글남기기