And today we're going to explore a tool from Microsoft called wsl or Windows subsystem for Linux, a technology that allows people to run Linux within Windows, using the command line, but I'm not it since some graphical applications also work in a Windows environment . normal this of course is especially useful and thought to be used for development but it doesn't mean that you who are not a programmer can't take advantage of this and the tools and utilities that linux can offer And you can also take advantage of our end sponsor or software which allows you to access servers and desktops remotely with full performance ideal for those situations where you want to give access to the same machine to multiple different users via a terminal I made a video on our other channel today Linux clips showing how this tool works and showing how to install then check it out later and sign up for this out ro channel also so as not to miss our other content for now let's understand what is series 1 and what is wsl2 I already said that it is a tool that allows you to run Linux within Windows but how exactly that works just as there are virtualization software such as VirtualBox VM Ware allows you to install other operating systems inside a host machine wsl especially wsl2 has an Aparecida footprint but is made to work more optimally using less resources than running a distro whole linux like ubuntu inside a virtualbox of life wsl2 is basically and an evolution of wsl one as it was supposed and here you can basically see a table of microsoft documentation that shows the differences between both the w series works both on windows 10 and Windows 11, in case you are running on Windows 10, which is my case here. Including your build and need is in 1904, a higher one to check r this opens the execution dialog there with the Windows er keys and type the anthem the window that will open you can check the bild of your Windows if your Windows is older check there if there are pending updates because they probably exist even though you you can find some distros like Ubuntu directly at least the Store if you don't enable w cearense It won't work the same way as you can see Enjoy that you're there at the Windows Store and install Windows to finish a very nice application that integrates well with wsl better than the old Windows terminal that you use there with e-mails with powershell for example And speaking of powershell to enable wcl just search for powershell in the menu open it as administrator then run the command wfl space dash dash a sol this will install the programs needed to run the linux environment and it will also install ubuntu by default for you as the wsl distribution and once once this process is finished you can try to run it by looking for wsl or for Ubuntu in the system menu but in my case only and after restarting the computer it is the first time you have opened wsl It may be that the terminal does not show you anything so wait a few moments because this only happens the first time when you are still configuring things eventually you will see a prompt where you will need to create a username and set a password for your linux during this process the password will be the one you will use for deaf or rute tasks and you use it for administrative tasks if you are just booting into linux now once inside the system you can even just use ubuntu which comes by default as any butt so normal you would use a server or a distribution installed on my version was VirtualBox the same installed on your desktop the commands work as it works on any Linux there is an integration with Faial System Windows and Faces has that Linux virtualized the entire C disk of Windows is accessible through a mount point in slash issue as you can see but you have a nice root sir don't do what you would expect to find there including a folder/home in Windows Explorer in the address bar if you type e against the back slash wsl and a dollar sign You can open your distro storage in wsl as a network shared folder and then you can pin it to your quick access bar to make it easier you know later in Windows 10 integration is cuter as we can see in this image here since it is already appearing there in the sidebar of Windows Explorer but in practice it's kind of the same thing and the good thing about using this new Windows ended up that you you can have a Shell in front of each of its Tabs so in a conforja tab you can give an IP config to see both the Windows network against the Linux network are wsl and as you can see they are at least in teo ria separate networks but there is a very simple integration ideal in case you need to run a server for example let's use Python to create a simple temporary web server it can even be used for you to share some and quickly if you want just get there in your wsl type go then three Space - M space http.
so see this works on any Linux distro too of course Now let's know that a browser in Windows even type local host: eight thousand since this is the port of our server and look at that we can access it quietly pretty cool, right, if you want to do the opposite way by running the Cat command from the ritc/resolve. com bar, simply looking there at the IP config itself you will bump into the IP that you can use to access any server that is running on your Windows through your wsl virtual machine is a linux machine although you are unlikely to happen i think one extremely important thing about wsl2 in particular is that it is manageable vel different from what happened with the w original series among the several new possibilities now you can change the distros that run inside your wsl so let's learn some commands for your Linux from within your Windows understand to list the available disks you can run in porto It's the command wsl and space less less list space less less online or the shortened version of that which is wcl and space less is space less that way you can see what tips are available officially there are several versions the donkey of the south sa from Cariri at a low cost it looks like one of those distros and since we already have a good one installed we can do the following wcl space minus install space minus distributions and the distro name like Kale trace Linux and that way we can install Kali inside Windows where we'll need to define a username and password to be able to use it as happened with Ubuntu pasta right And if you close and open Windows they end you will be able to open a new tab directly in cale because an option Zinho a Extra will appear there you can also install a distro using a variation and when what is wsl space less less install space less than and the name of the Debian distro for example that the logic is the same as in other distros and then to list all the distros you have just run the command wsl space minus list space minus less verbose and that way you can see which version of wsl you are using Which distro main part of the environment and also which one is running and which one is stopped and such to define one of the default wsl you can run the following command wsl space minus minus I say minus minus but it's actually a little dash, right dash 1-7-1 of photo and the name of the disk should for example And now if we run the previous command again we can see that the asterisk indicates Debian as the main easy thing right David if he ends up working as a container orchestrator but in this case he runs a meat or less that virtual machines can take advantage of You can check for updates to series using the command wsl space - - update Remembering that you need to run Windows terminal as administrator for this command to work beauty check the status of wsl. com wcl minus minus status also a possibility and of course You can read the wsl help menu by typing wsl space minus minus straight let's say now you want to remove a Linux distro from your wsl this case the command a little different look wsl space - - 1 register E then you put the name of the distro Talita Sulino, for example, and running the list command and you can see that it was removed, it's very complicated, right and guys , starting tomorrow the Python event starts at ebac our sponsor that will last two days so pay attention In this quick message, the event is completely free and online and the idea is to show you how to use father so to work like a scientist the data analyst receiving data you will learn about the world of data is only for beginners explaining the concept of Python using childbirth in practice libraries used by professionals in the field and exploratory analysis click here on the link that I will leave in the description to learn more and ensure its vacancy on February 16th and 17th at 19 pm although there are some views available by default the open-source community in a clear way of creating a way to install arte Linux inside wsl doesn't seem particularly complicated nothing that the arte user it hasn't differentiated before I'm sure so I'll leave the link here in the description if you want to follow this tutorial and make this modification .