1 00:00:06,480 --> 00:00:08,259 So how does it work in wsl? 2 00:00:08,839 --> 00:00:12,589 Well, there's a little bit of confusion, and that is because WSL 3 00:00:12,589 --> 00:00:16,339 version 1 doesn't use systemd, it uses a service command instead. 4 00:00:16,980 --> 00:00:20,685 Like old Linux distributions, I.e. linux distributions before 5 00:00:20,685 --> 00:00:24,390 approximately the year 2014, more or less. 6 00:00:26,440 --> 00:00:30,960 So systemd is really something from the last decade. And service is pretty old. 7 00:00:31,960 --> 00:00:38,000 So if you don't have systemctl, there's a service command and in the service command the order is just inversed. 8 00:00:38,000 --> 00:00:44,039 So service, then the name of the service, and then start or status or whatever you want to do. 9 00:00:46,340 --> 00:00:51,623 Probably you don't have to do that very often by default because WSL doesn't run many services 10 00:00:51,623 --> 00:00:56,906 by default. That is what most people are doing on Linux. But nothing prevents you from using 11 00:00:56,906 --> 00:01:02,189 sudo apt, install, whatever to install the whatever service and then you need to manage it. 12 00:01:02,950 --> 00:01:08,234 On WSL version 2, it's so much easier because it uses systemd, so you 13 00:01:08,234 --> 00:01:13,519 can use systemctl for managing services just the way how you normally do it. 14 00:01:14,840 --> 00:01:21,239 Let me demonstrate here we have wsl. How does all of this work in wsl? 15 00:01:21,810 --> 00:01:26,050 Well, to start with, let me install an 16 00:01:26,050 --> 00:01:30,290 application, sudo apt, install yvs ftpd for instance. 17 00:01:32,590 --> 00:01:38,000 And then what do we see? Well, let me clear screen and 18 00:01:38,000 --> 00:01:43,409 let me do a sudo systemctl status on vsftpd and there we 19 00:01:43,409 --> 00:01:48,819 can see that vsftpd is running. That makes it easy. 20 00:01:49,719 --> 00:01:53,909 Now in older versions of WSL you didn't have the 21 00:01:53,909 --> 00:01:58,099 systemd installed. You needed to use the service command instead. 22 00:01:59,040 --> 00:02:03,890 Then it would be sudo service vsftpd status, 23 00:02:03,890 --> 00:02:08,740 which is giving the same kind of information. 24 00:02:09,379 --> 00:02:10,400 So easy. 25 00:02:11,120 --> 00:02:13,909 Just use sysmd if you are on WSL2.