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

systemd still not working on wsl2 #4202

Closed
elswerky opened this issue Jun 20, 2019 · 8 comments
Closed

systemd still not working on wsl2 #4202

elswerky opened this issue Jun 20, 2019 · 8 comments

Comments

@elswerky
Copy link

elswerky commented Jun 20, 2019

why still systemd services still not working on wsl2 ??

i am using arch on wsl2
and ubuntu 18.04 on wsl2

can you help plz to make systemd services works on wsl2 ?

@craigloewen-msft
Copy link
Member

craigloewen-msft commented Jun 20, 2019

A WSL user has posted how to set up systemd inside of WSL 2. You can view their repo here.

Thank you to cerebrate on Github!

@therealkenc
Copy link
Collaborator

therealkenc commented Jun 20, 2019

#994

@datdinhquoc
Copy link

datdinhquoc commented May 31, 2020

A WSL user has posted how to set up systemd inside of WSL 2. You can view their repo here.

sadly the guide is only for debian-based wsl :(

@nezorflame
Copy link

nezorflame commented Jun 3, 2020

@datdinhquoc actually now it also supports Arch with AUR packages: https://github.com/arkane-systems/genie#arch

@germainlefebvre4
Copy link

germainlefebvre4 commented Jun 19, 2020

A WSL user has posted how to set up systemd inside of WSL 2. You can view their repo here.

sadly the guide is only for debian-based wsl :(

There's an Ubuntu section that is working for me on Ubuntu 18.04 and apparently in 19.10 but not in 20.04.

Another trick is to fake the bash binary : https://github.com/shayne/wsl2-hacks

@markusmo
Copy link

markusmo commented Sep 11, 2020

A WSL user has posted how to set up systemd inside of WSL 2. You can view their repo here.

sadly the guide is only for debian-based wsl :(

There's an Ubuntu section that is working for me on Ubuntu 18.04 and apparently in 19.10 but not in 20.04.

Another trick is to fake the bash binary : https://github.com/shayne/wsl2-hacks

This repo broke my 20.04 installation of Ubuntu on WSL2

@lildonpancho
Copy link

lildonpancho commented Sep 14, 2020

This article shows how to get systemd up and running on WSL2 which in turn will allow you to access Snaps. I found it while I was trying to figure out how to get Microk8s to work on WSL2 as Hyper-V blocks me from being able to go my normal route which was using Multipass. I was THIS close to uninstalling WSL2. Problem solved and I am off to the races. Hope this helps.

https://wsl.dev/wsl2-microk8s/

@lopugit
Copy link

lopugit commented Jan 29, 2021

This article shows how to get systemd up and running on WSL2 which in turn will allow you to access Snaps. I found it while I was trying to figure out how to get Microk8s to work on WSL2 as Hyper-V blocks me from being able to go my normal route which was using Multipass. I was THIS close to uninstalling WSL2. Problem solved and I am off to the races. Hope this helps.

https://wsl.dev/wsl2-microk8s/

I've gotten systemd working via this, although he puts NOPASSWD: ALL in his %sudo group /etc/sudoers file which I would never do so it just means you need to enter sudo password everytime you start a session, which is a bit annoying but safer than having NOPASSWD...?!?!? Is there a way to do it by having a separate user to launch systemd with nopasswd just for that extra user and then enter a normal session for your default user?

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

No branches or pull requests

9 participants