WEBVTT 00:05.620 --> 00:11.890 In a recent video about virtual machines I made mentioned that Microsoft has taken significant steps 00:11.890 --> 00:14.660 to embrace the open source community. 00:14.710 --> 00:22.090 One of those steps is the inclusion of a subsystem for Linux the windows subsystem for Linux is a Windows 00:22.090 --> 00:27.450 feature that allows you to run an instance of Linux on your server. 00:27.460 --> 00:33.130 Now I'm not talking about a dual boot scenario Windows and Linux can run at the same time. 00:33.190 --> 00:37.480 This doesn't require hyper v or virtual machines or containers. 00:37.480 --> 00:39.220 It's not virtualization at all. 00:39.250 --> 00:47.670 It's an entire instance of Ubuntu or Seuss Linux running concurrently on your Windows Server installing 00:47.670 --> 00:53.040 the feature is pretty simple but pulling down and installing a Linux distribution does take a couple 00:53.040 --> 00:54.500 of steps. 00:54.570 --> 01:00.720 You can install the subsystem by using the install Windows feature and power shell or by launching the 01:00.720 --> 01:02.540 wizard from the server manager. 01:02.610 --> 01:06.900 Since I did the last human and power show I'll go ahead and run this one from server manager just for 01:06.900 --> 01:07.980 fun. 01:07.980 --> 01:16.070 I'm going to launch the wizard from the dashboard and move forward through yes I want to install a role 01:16.070 --> 01:23.270 or feature I want to install it on this machine and it's not a role I want to install a feature. 01:23.420 --> 01:29.420 So here I'm going to scroll to the very bottom of the alphabetic list and look for Windows subsystem 01:29.420 --> 01:30.900 for Linux. 01:30.900 --> 01:36.440 And when I check that box you can see that no additional steps were added so I can go ahead and just 01:36.440 --> 01:39.580 continue on forward and add this feature. 01:42.140 --> 01:46.950 Now this installation might only take a few seconds or a couple minutes depending on your resources. 01:47.090 --> 01:52.350 But as you can see here it does require a reboot because it's made some substantial changes. 01:52.550 --> 01:57.710 So I'm going to go ahead and close this wizard and reboot the system 02:01.140 --> 02:09.480 a restart because of a planned operating system reconfiguration and I'm going to fast forward to the 02:09.480 --> 02:12.490 point where the server has restarted. 02:12.840 --> 02:19.800 All right now that the reboot has completed I want to download and install a distribution of Linux so 02:19.800 --> 02:27.750 let me go ahead and move over to power shell to do that run as administrator and first we need to go 02:27.750 --> 02:35.150 ahead and download it and to do that I'm going to use the invoke web request command let. 02:35.390 --> 02:37.910 I need to specify a couple of parameters here. 02:37.910 --> 02:43.940 First I need to say that the you r i is h TTP s 02:46.770 --> 02:51.080 a k a dot M S slash. 02:51.280 --> 02:54.990 And here I give the name of the distribution that I would like to download. 02:55.030 --> 02:58.620 And you can do web searches to find what's available at the time. 02:58.810 --> 03:06.830 I've seen SLAs JNU suits Debian Ubuntu available for downloading and use in this environment. 03:07.030 --> 03:19.110 But I'm going to go ahead and start with an a bunch to distribution one to let's use 16 0 4 and then 03:19.170 --> 03:25.680 another parameter that I need to add to this command what is I need to specify the output file 03:31.660 --> 03:37.640 and the file that I'm going to create I'm going to give it a very simple name to type later I'm just 03:37.640 --> 03:44.210 going to call it a bunch to dot AP X because that's the file extension that it's downloading anyway 03:45.110 --> 03:47.270 and I'm going to add one other parameter. 03:47.300 --> 03:57.560 Use basic passing. 03:57.680 --> 03:59.720 Now this download can be fairly large. 03:59.720 --> 04:06.170 So once again I'm going to skip forward quite a bit and the video will resume momentarily at the end 04:06.170 --> 04:08.770 of this download. 04:08.790 --> 04:09.480 All right. 04:09.480 --> 04:13.150 Now that's downloaded and know my server isn't quite that fast. 04:13.230 --> 04:16.970 We just trimmed out some of the time to speed things up a bit here. 04:17.160 --> 04:22.230 Now that the downloads done we're going to need to rename the files so that we can unpack it. 04:22.470 --> 04:29.220 The Linux installer downloads as an AP exe file but that file has all of the same properties as a common 04:29.220 --> 04:40.410 zip file so I can rename the file right here in power shell using rename item the file that I want to 04:40.410 --> 04:51.380 rename is Ubuntu dot AP ex and I would like to rename it to Ubuntu dot zip 04:54.640 --> 04:57.320 and renaming doesn't take very long at all. 04:57.340 --> 05:00.490 So the next commandment is to expand the archive 05:03.790 --> 05:09.580 and we're going to unpack the file Ubuntu dot Zip. 05:12.540 --> 05:19.980 And we're going to put all of that information in a new directory which we will create and call Ubuntu 05:22.570 --> 05:24.910 and that unpacking doesn't take very long. 05:25.540 --> 05:27.970 Let me go ahead and take a look at where we are. 05:29.040 --> 05:32.700 Here you can see that the Ubuntu folder is not here. 05:32.700 --> 05:36.610 That's because I told it to put this folder in the root of the drive. 05:36.810 --> 05:44.110 So let me go ahead and change directories to the root of this drive and if I hit the directory again 05:44.440 --> 05:46.190 there's my Ubuntu folder. 05:46.420 --> 05:53.360 So change directories into the Ubuntu folder run another directory listing. 05:53.430 --> 06:02.310 And here we find the Ubuntu dot EMC the file that's going to install this distribution of Linux in power 06:02.370 --> 06:08.820 so when you want to run an executable even if you're in the current directory it's always a good idea 06:08.820 --> 06:15.540 to start with dot slash and power Shell is not real particular about whether that slash leans forward 06:15.540 --> 06:22.400 or backwards whichever you type will end up working out just fine but let me go ahead and type Ubuntu 06:22.400 --> 06:30.740 dot e x e and that will install Linux into that subsystem on this machine. 06:30.750 --> 06:36.480 Now this is going to take longer than the download but when it's complete you'll be asked to create 06:36.510 --> 06:42.900 a Linux user name and password and then you'll be dropped directly into your Linux environment. 06:42.900 --> 06:49.140 You can exit out of that and at any given time you can open power shell or a command prompt and type 06:49.200 --> 06:53.670 bash to re-enter your selected Linux distribution. 06:53.670 --> 06:57.430 That environment will allow you to install Linux applications. 06:57.660 --> 07:03.480 Maybe you want to install the Linux instance of Docker then you can host windows containers and Linux 07:03.480 --> 07:09.480 containers at the same time from the same physical hardware or from within the same virtual server.