So how does it work in wsl?
Well, there's a little bit of confusion, and that is because WSL
version 1 doesn't use systemd, it uses a service command instead.
Like old Linux distributions, I.e. linux distributions before
approximately the year 2014, more or less.
So systemd is really something from the last decade. And service is pretty old.
So if you don't have systemctl, there's a service command and in the service command the order is just inversed.
So service, then the name of the service, and then start or status or whatever you want to do.
Probably you don't have to do that very often by default because WSL doesn't run many services
by default. That is what most people are doing on Linux. But nothing prevents you from using
sudo apt, install, whatever to install the whatever service and then you need to manage it.
On WSL version 2, it's so much easier because it uses systemd, so you
can use systemctl for managing services just the way how you normally do it.
Let me demonstrate here we have wsl. How does all of this work in wsl?
Well, to start with, let me install an
application, sudo apt, install yvs ftpd for instance.
And then what do we see? Well, let me clear screen and
let me do a sudo systemctl status on vsftpd and there we
can see that vsftpd is running. That makes it easy.
Now in older versions of WSL you didn't have the
systemd installed. You needed to use the service command instead.
Then it would be sudo service vsftpd status,
which is giving the same kind of information.
So easy.
Just use sysmd if you are on WSL2.