The Truth About Systemd Under WSL2

  Рет қаралды 2,837

Mike Levin, SEO in NYC

Mike Levin, SEO in NYC

Күн бұрын

Пікірлер: 16
@MrNoBSgiven
@MrNoBSgiven Жыл бұрын
Mike, I believe you are missing one big difference between WSL and the independent Unix machine and the main purpose - WSL is to be uxed as a development environment and not production. Missing Systemd didn 't allow for full testing of unix scripts, programs (like your python based service). Now it does. Let's not corget that you are using it on laptop computer, which in its nature assumes lack of uninterruptible access by the externap world. BTW, docker images also lack support for systemd by default. Some folks created own,mhacked versions, so it is possible for github actions to test ansible scripts, which affect system services installation procedures. Sometimes we have a tenency to overcomplicate thinks and forget about the K.I.S.S. rule. Notice how many websites run on wordpress instead of being static. For example, I could not understand the attraction to products like Hugo or Gutsby by many folks, but finally got it. I was concentating on flexibility instead of the main functionality I needed. I think, you are making the same thing. If you need a constantly running services, put them onna dedicated machines (virtual, physical). If you shut down VM, lxd container like you do WSL, they will also disable systemd, won't they? 😉
@MikeLevin
@MikeLevin Жыл бұрын
Just to clarify, you're saying that systemd under WSL on a laptop should be different than systemd not under WSL? So, one behavior for Microsoft-based Linux and another behavior for "genuine" Linux? And no, WSL will not exit it you use one of the systemd hacks out there like distrod. Moving to native systemd was a step backwards. And no, LXD does not stop running when the host machine closes terminals to it. It stays running always in the background, as do its systemd tasks. I think the position that WSL exits when terminals close is untenable. Microsoft's killing WSL instances deliberately in for some reason contrary to the concept of Linux daemon.
@davidcopenhaver5583
@davidcopenhaver5583 5 ай бұрын
Totally agree, when considering what WSL is meant for, this is completely expected and acceptable behavior. For Mike's use case a full VM seems more fitting.
@MikeLevin
@MikeLevin 5 ай бұрын
Why would you incur the overhead of a whole VM when WSL is built into windows? I'm not sure why the option that exists to activate systemd just doesn't work. I would accept it as a default, but not as zero option.
@LukeAvedon
@LukeAvedon Жыл бұрын
Absolutely fascinating video Mike!
@MikeLevin
@MikeLevin Жыл бұрын
Thanks. It's funny to learn. Wait 8 seconds and FREEZE! I couldn't figure out why Jupyter kept stopping when I quit the last terminal. I had to put 2 and 2 together just to figure out that's what was going on.
@davidcopenhaver5583
@davidcopenhaver5583 5 ай бұрын
that's exactly how I would expect it to behave.
@EnavSounds
@EnavSounds Жыл бұрын
Great video, you look like a cool dude to share a joint with.
@syedwasifsimnani2776
@syedwasifsimnani2776 Жыл бұрын
I had the same issue with the nginx server after enabling systemd. At first, I thought it was a bug and tried searching for information about it, but found nothing. Finally, I found this video which talks about the issue. It is very annoying to have to keep the terminal open for the instance to keep running."
@MikeLevin
@MikeLevin Жыл бұрын
I believe it is one the biggest tech issue of our day that systemd has finally come to Windows via Microsoft… broken. I'm glad that there's at least one other person who sees this.
@juanbaromance
@juanbaromance Жыл бұрын
IMHO To consider the systemd framework alive only under the surveillance of a terminal is more than a naive approach
@MikeLevin
@MikeLevin Жыл бұрын
Exactly! It could open the door to so much innovation on the Windows platform.
@eusamuel
@eusamuel Жыл бұрын
Who'd truly expect Microsoft to prioritize WSL background processes? I mean sure there could be a switch to make it happen but to expect it to be on by default is too much
@MikeLevin
@MikeLevin Жыл бұрын
Okay then how about not on by default but able to be turned on (to stay on)? I think the current implementation underestimates how much of our tech world actually runs on Linux daemons.
@eusamuel
@eusamuel Жыл бұрын
@@MikeLevin Yes able to be turned on and stay on is reasonable.
@MikeLevin
@MikeLevin Жыл бұрын
I would like someone to report to me if this is possible. I've tried: [wsl2] vmIdleTimeout=600000 ...in a .wslconfig file under Windows home and even did wsl --shutdown to try to get it to stick, but nothing I try stops Windows from nuking all Linux daemons after about 8 seconds. I'm open to overriding this behavior cleanly, but am currently testing hacks like detached sleep commands that never return, but I shouldn't have to. Hosting Jupyter under Linux is the definition of reasonable expectation for systemd under wsl.
Windows Subsystem for Linux setup WSL2 Systemd, Ansible, and Kubernetes
20:50
The Trick of Running LXD Linux Containers on Windows WSL 2 Ubuntu 20.04 and 22.04
40:41
Sigma baby, you've conquered soap! 😲😮‍💨 LeoNata family #shorts
00:37
World‘s Strongest Man VS Apple
01:00
Browney
Рет қаралды 69 МЛН
ex USA Women vs Men 0-12 - All Goals & Highlights 2023
4:01
Women Football Best Moments
Рет қаралды 2,8 МЛН
Microsoft Is Destroying Linux - WSL & WSL2 Are Evil!
1:07:41
eBuzz Central
Рет қаралды 16 М.
Distro-hopping In Linux May Be Bad For Your Mental Health
12:23
Linux Dev Labs
Рет қаралды 1,2 М.
Windows Subsystem for Linux (WSL) - Kali Linux with GUI
13:44
Daniel Brother-Bear Barras
Рет қаралды 1,4 М.
The Pros and Cons of Linux in Windows
10:48
Titus Tech Talk
Рет қаралды 45 М.
WSL 2 With Docker Getting Started and Docker Desktop Installation
13:27
Beachcasts Programming Videos
Рет қаралды 30 М.
Ubuntu 24.10: the SNAP ecosystem improves, with a touch of nostalgia
21:21
The Linux Experiment
Рет қаралды 63 М.
The Tragedy of systemd
47:18
linux.conf.au
Рет қаралды 1,1 МЛН
Why Linux is better for (most) developers!
14:59
The Linux Experiment
Рет қаралды 478 М.
Sigma baby, you've conquered soap! 😲😮‍💨 LeoNata family #shorts
00:37