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 doesnt work #2209

Closed
Arios509 opened this issue Jun 12, 2017 · 19 comments
Closed

SystemCTL doesnt work #2209

Arios509 opened this issue Jun 12, 2017 · 19 comments

Comments

@Arios509
Copy link

This bug-tracker is monitored by developers and other technical types. We like detail! So please use this form and tell us, concisely but precisely, what's up. Please fill out ALL THE FIELDS!

If you have a feature request, please post to the UserVoice. If you're reporting a BSOD, don't post here! Instead, e-mail "secure@microsoft.com", and if possible attach the minidump from "C:\Windows\minidump".

  • Your Windows build number: (Type ver at a Windows Command Prompt)
    Microsoft Windows [Version 10.0.15063]

  • What you're doing and what's happening: (Copy&paste specific commands and their output, or include screen shots)

image

  • What's wrong / what should be happening instead:
    I wish to run a self host server with using the bash, but it couldnt use systemctl and enable it so everytime i start the PC and dont need to self type it again.
    I wish this could add in it as soon as possible, cause it really helpful.
@sunjoong
Copy link

sunjoong commented Jun 12, 2017

@Arios509 - It looks like a regular issue of systemd. In short.... (quote from #1990 (comment) )

The command, systemctl, looks like a part of systemd.

systemd is a suite of basic building blocks for a Linux system. It provides a system and service manager that runs as PID 1 and starts the rest of the system. -- What is this?

PID 1 in WSL is /init, not systemd.
I think, "/etc/init.d/apache2 restart" or alike might be helpful; traditional service start/stop/restart method.

And... #1579 (comment)

Starting dbus (sudo service dbus start) will get you a little further but in short no systemd no systemctl

And... #994

@Arios509
Copy link
Author

@sunjoong But i would rather systemctl add in, it make things easier.

@sunjoong
Copy link

sunjoong commented Jun 13, 2017

@Arios509 - I mean... You could vote https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/suggestions/16571479-support-for-running-systemd or join discussion of #994, but you cannot use systemd on current WSL; Indeed systemctl doesn't work on WSL, and there is no solution or workaround for systemd itself just now.

@seadonfrank
Copy link

You may want to try using Upstart to run and manage third-party services
Also, Follow me on linkedIn , I am going to publish an article very soon on WSL and running opensource project with WSL. Hopefully, it should give you a comprehensive guide while you start working with WSL

@therealkenc
Copy link
Collaborator

#1579

@fenchu
Copy link

fenchu commented Dec 5, 2017

service works (/etc/init.d/*), but does not autostart after reboot, so you need to manually start everything.

@JacobDB
Copy link

JacobDB commented Dec 7, 2017

@fenchu couldn't you write a script that runs at startup to do this?

@guillobits
Copy link

A solution for this problem has been found ?

@gmanroney
Copy link

has a solution for this been found? experiencing problem on ubuntu WSL on Windows 10
Linux DESKTOP-0JO2PLS 4.4.0-17134-Microsoft #345-Microsoft Wed Sep 19 17:47:00 PST 2018 x86_64 x86_64 x86_64 GNU/Linux

@jrodd96
Copy link

jrodd96 commented Nov 4, 2018

no solution from what I have seen as of today. using debian subsystem on windows 10 dell pc

@hshar7
Copy link

hshar7 commented Nov 15, 2018

Please fix systemd! Really would make Wsl more useful!

@oxfos
Copy link

oxfos commented Dec 15, 2018

Same problem here when trying to create systemd socket and service files for gunicorn (I'm working on Django projects in WSL):

$ sudo systemctl start gunicorn.socket
System has not been booted with systemd as init system (PID 1). Can't operate.

@anandejju
Copy link

this is still problem , on window 10 Dell , ubuntu subsystem
systemctl status jenkins
System has not been booted with systemd as init system (PID 1). Can't operate.

@rayj00
Copy link

rayj00 commented Apr 13, 2019

I would really like to run LXD on WSL. Please don't suggest HyperV or vBox. I am working on an application that uses LXD on my VPS under Ubuntu 16.04 and I can at least run LXD and create containers. On WSL, I can't do squat as LXD will not start because of that systemd issue! Please fix!

@therealkenc
Copy link
Collaborator

LXD will not start because of that systemd issue

Actually lxd has bigger problems than that. But yes. systemd would be a start, assuming the distro in the container required systemd.

@samayo
Copy link

samayo commented Oct 24, 2019

Any news on this?

@hshar7
Copy link

hshar7 commented Oct 24, 2019

I think even in wsl2 it won't work..

@samayo
Copy link

samayo commented Oct 25, 2019

I got it working using this #1579 (comment) but nginx and php refused to work together in WSL so at the end, I say stay away from WSL

@rosalesjahaziel
Copy link

There is a workaround for WSL2 using genie

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