-
Notifications
You must be signed in to change notification settings - Fork 821
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
Shutting down WSL instance #3253
Comments
Sadly there isn't an official one; that I am aware of anyway (I got chirping crickets when I asked, natch). This is technically dupe of three digit #200. Ref #2533 (which was framed badly). You can kill the At base I suspect this has been punted because |
Couple of days later it occurs to me that maybe this doesn't have to be a federal case. Perhaps it would be reasonable as an interim measure if " |
I understood that I didn't understand anything. |
net.exe stop LxssManager will terminate all running instances. |
I have added an option to wslconfig (wslconfig.exe /terminate ) to shut down a distribution from the command line. This change is making its way to Insider builds. |
Ooooo.... New option like BTW, if someone move or rename the |
Beggars can't be choosers, so 👍. But doing it on that side means you can't make a Bash Turns out old-school shutdown is supported by
Who knew. Seems like a reasonable ask. Or something. [ed] That or snipe #2578 by introducing a |
So, I've seen a lot of talk regarding Windows/Linux interop. As far as init goes: Couldn't we just create an arbitrary folder -- let's say, I.e., say we have these files: /etc/init_wsl.d/50_site.sh
/etc/init_wsl.d/51_sshd.py Each script is called in-order, and receives {
"state": "starting up"
} ..on Or, use environment variables -- 'WSL_STATE` is set to 'starting up'. Really, you could load it with whatever info you want. Any major state changes, such as:
I figure you'd use the windows This would allow users and distros to track system state changes, and write their own scripts for handling those events, and integrating them however they wish, and keeps the MS side comparatively simple. Specifically, as far as this issue goes, the scripts are run, and "WSL_STATE" is "shutting down" or "rebooting". User script catches that, and does "service foo stop" for each service they want to stop. Done and done. |
|
|
By the way, now it's just |
Is that a clean shutdown? I.e., are processes given enough time to shutdown? |
No it is a big red switch. Per above, |
Windows 1803/17134. Ubuntu 18.04 from windows store.
Run -> cmd -> wsl.
sudo service nginx start; (nginx/mysql, ...)
exit;
close cmd
Task manager: nginx working, mysql working, ...
Sorry, can not find the answer: How to shutdown WSL?
The text was updated successfully, but these errors were encountered: