In this video I'm going to show you how to install and set up a whole bunch of options in WSL in a previous video which I've linked below I showed you many of the cool features available in WSL like how to use remote desktop with an Ubuntu distro running in WSL or how to use Kex on KaIi Linux so that you get the GUI interface on Kali Linux how to use applications such as hashcat within WSL so that you can leverage the GPU to crack Wi-Fi hashes as an example. In this video I'm going to show you the full process how to install WSL how to set up a bunch of cool options within WSL if you've already watched the previous video where I show you how to install WSL then jump to this timestamp so that you skip that part of the video and go straight to the part where I show you how to set up a whole bunch of other options within WSL. Okay without further ado let's get started installing and setting up WSL. Now before you install WSL you
probably want to look at the prerequisites the prerequisites are you must be running Windows 10 Version 2004 and higher build 19041 and higher or use Windows 11 using the commands below to install WSL you simply type wsl --install. So to check that I meet the prerequisites I'm going to type about your PC and in this example I've got Windows 11 home version is 24H2 installed in this date, this is the OS build so I meet the requirements to install WSL now I much prefer installing WSL and the distributions using the CLI but you can use the Microsoft Store so I'll search for Microsoft Store and I could search for KaIi as an example so KaIi Linux and notice that app can be downloaded and installed from the Microsoft Store so as they're showing you here you could run Burp Suite on WSL but again rather than doing it this way I much prefer just using the CLI but that is an option if you prefer doing it that way so I'm going to open up PowerShell now I'll just type WSL here and notice on this version of Windows we told that to install WSL we need to use --install on other versions of Windows if you type WSL it actually just asks you to install it and you can just press enter to install it but on this version and to follow the official documentation you need to type wsl --install so I'll clear the screen and I can type wsl --install per the recommendations now we are told that you need to run the command as administrator i'm logged in as administrator so I didn't have to do that remember you need administrator rights to install WSL. So again command is wsl --install I'll press enter and we told that it requires elevated privileges and we asked do you want to allow the app to make changes and the answer is yes we do and you can see it's installing the Virtual Machine platform okay so the Virtual Machine platform is installed we told that the app needs to make changes i'm going to say yes we told that the Virtual Machine platform has been installed and now it's installing the Windows subsystem for Linux. Okay so WSL has now been installed and Ubuntu is now being installed that is the default distribution when you install WSL. Okay so Ubuntu has been installed and now we're told that the requested operation is successful changes will not be effective until the system is rebooted so what I'll do now is restart the computer and once it reboots we should be able to start using Ubuntu on this Windows computer.
Computer's now rebooted and I can log in so what I'll do is start PowerShell and if I now type WSL notice something is happening it says provisioning the new WSL instance Ubuntu it might take a while what we need to do now is create a default Linux username it doesn't have to be the same as Windows so I'll say David and I'll specify a password and login and as you can see there we are now running Ubuntu just to make the point if I type lsb_release -a you can see we're running Ubuntu 24.04 LTS so type exit now we're back in Windows wsl-list shows us distributions that we've installed we've installed the default which is Ubuntu so I'll clear the screen here and just show you that again so wsl --list default is Ubuntu if I use the option online that shows me other distributions that I can install so I'll just do that again wsl --list --online notice we can install Kali Linux as an example or a different version of Ubuntu or Debian different distributions can be installed so at the moment the list shows us that we only have Ubuntu installed if I want to install another distribution I would use the command wsl --install -distribution or d and here I could specify Kali Linux as an example if I can spell correctly so Kali Linux and notice that's now downloading Kali Linux onto this machine and we'll install it it's fantastic that you can install different distributions of Linux and run that all locally within Windows. So Kali Linux is being installed and notice we told that we can launch it by using the command wsl -d kali-linux so I'll clear the screen again wsl --list shows us that we have Kali and Ubuntu installed if I type WSL that will start the default distribution which is Ubuntu exit look at my list if I want to run Kali I have to specify that distribution so wsl -d kali-linux and that starts Kali okay so we're told to specify a username so I'll use something different here and I'll specify my password lsb_release -a shows us that we are running Kali now so type exit again wsl --list shows us that we have two versions of Linux I could start Kali as an example by specifying it here or I could simply search for it in Windows and notice it shows up as a app and I could run that app if I wanted to run Ubuntu I could search for the Ubuntu app and run that and there you go i've got Ubuntu and Kali running on that laptop now we can use this command dpkg-query to list the number of packages installed there are only 282 packages installed now if we did the same test on a virtual machine you would have 2,793 packages much more than you have within WSL so you could run the command kali-tweaks to install additional software so what do you want to install hardening, metapackages other options so I'm going to choose metapackages and then you can decide what to install notice there are Kali Windows resources the default everything headless a whole bunch of other options including WSL so that's been selected so what I'll do here is select the Linux default option so Kali default tool set and click apply and select okay we're told that our system is not up to date we need to update it so I'm going to click okay to update it select yes to install the software so scrolling up so the command that was used in the background is sudo apt-get full-upgrade this is going to take a while so I'll speed up the video at this point but essentially we are upgrading the version of Kali to the latest release and then we are installing additional software as an example again on this laptop I have all of these applications because I installed the additional software [Music] Now you can get Kali to automatically change MAC addresses i'm going to say yes to that now with Kismet we're told that it needs root privileges for some of its functions however running it as root is not recommended i'm going to say no i'm just going to select no here for dump cap and I'm going to say standalone for SSL so basically I'm just going with the defaults okay so we told that we can press enter to continue so I'll press enter now now we back to the main menu where I selected metapackages so I could select that again and notice I can see the various packages that are installed so Kali Linux default is installed we got the top 10 we've got Kali Linux for WSL so if I click apply now I'm sent back and what I'll do is quit that menu so now notice if I type lsb_release -a I'm running Kali Linux 2025.1 so we have upgraded the version of Kali here I also have a lot of tools installed that weren't installed previously so as an example hashcat is installed if I didn't run the Kali tweaks command I would have to manually install hashcat on WSL now we don't have a GUI at the moment on Kali all I have is the CLI so what I can do is type sudo apt install kali-win-kex so as you can see software is now being [Music] installed okay so that's now completed so what I can do is type kex we need to specify a password so I'm going to say kali kali so I'm going to specify a password be told that it's too short so I'll do that again i'm not going to set a view only password the kex server has started and there you go I've got Kali Linux running on this computer now if I press F8 I can either disconnect really important that you disconnect your session or I could say I don't want to use full screen anymore so I can reduce that as you can see I've got Kali within a terminal as well as a GUI running on Windows and if I click here I can see password attacks such as hashcat so I could run hashcat here so I could say hashcat -i and that will show me if I have a GPU on the computer or just a CPU as you can see here this specific laptop only has a CPU i could obviously just do that through the CLI and as you can see here I only have a CPU available i don't have a GPU available but again here I could start GUI applications such as Firefox and go to kali.org or as an example start Burp Suite i'm not going to send information about Burp i'm going to accept the license agreement and click next and I can start Burp Suite on that laptop the reason it works once again is that I ran Kali tweaks which gave me a lot of extra software which you wouldn't have if you just installed WSL with just the default software so again proxy I could open up the Burp Suite browser directly here and there you go i've got the PortSwigger website open and through their browser I could go to kali.org and I could also run interception if I wanted to but I'll close burp down okay big
tip here is make sure that you press F8 and you click disconnect to disconnect your GUI session don't forget to do that once again on this laptop over here the MSI laptop I also have the GUI and again here I would need to type disconnect to shut down my session and to open up that again I could simply type kex and there you go it's opened the GUI in full screen and I could stop full screen and just show it as a window. In this section I'm going to show you how to install the required software so that you can use the GPUs from within WSL so at the moment as an example if I run hashcat -i firstly hashcat is not installed here so I'll say sudo apt install hashcat and say yes to install that [Music] software okay so clear the screen let's try that again hashcat -i what you'll notice here is we only see a CPU we don't see the GPU we only have access to the CPU from within WSL but if I type nvidia-smi you can see that there is a GPU on this computer so nvidia-smi CUDA version is this we can see that there's an NVIDIA GTX RTX 4090 within this laptop so it's there i just don't have access to it within Hashcat all I have access to is the CPU so the first thing we need to do is download the relevant software from NVIDIA these commands are available in the PDF so I'll press enter software is now downloaded so now we'll install the Kudo keyring so sudo dpkg to install it and there you go it's installed sudo apt update to update our references so I'll clear the screen and now we can install the Kudo toolkit so that's now being installed again the commands are available in the PDF okay there you go the software is now installed so I'll clear the screen and now if I type hashcat -i does it pick up the GPU and the answer is yes it does you can see the GPU is now available to hashcat so on my desktop here is an 8 digit hash so let's go to that directory so mount/c/users/david downloads desktop ls shows us that hash i'll clear the screen so what I'll do here is run hashcat the device is one which is our GPU we're going to do brute force attack against a Wi-Fi password this is the file the file on my Windows desktop and we're going to use eight digits to crack it so hashcat is now starting type s to get a status 8 digit mask cracking a Wi-Fi password there's the file name notice we can add W3 to increase performance we are cracking using the GPU device one so I'll press S to get a status update you can see we're about 38% way through cracking okay and there you go took about a minute and 10 seconds to crack this 8 digit password there is the password so we were able to leverage the GPU in this Windows computer from within WSL now by default when you install WSL the default installation is going to be Ubuntu but as an example I may want to make Kali the default installation so as an example if I type WSL here I am taken into Ubuntu 2404 type exit clear the screen list again shows me that that's because this is the default installation in WSL so if I want to set the default installation to let's say Kali I would use the command wsl --set -default kali-linux and press enter so list now shows that that's the default so if I type WSL rather than being taken into Ubuntu I am now in Kali Linux that's my default installation type exit here i'll clear the screen again the list shows me that Kali is the default if I add the option verbose I can see the state of my running WSL distributions in this example Ubuntu 2204 is stopped but Kali is running and Ubuntu is running status can also be used to see the default distribution so you can see Kali is the default distribution the version of WSL that we're using is WSL version 2 WSL version one is not supported on the system so what I'm going to do now is continue on this computer much more powerful computer and show you a whole bunch of options available in WSL what I'll do is run PowerShell and notice on this computer if I type wsl --list I have a whole bunch of distributions installed with Kali being the default distribution what you'll also notice is I've actually installed multiple instances of Kali Linux the way you do that is you can't simply type --install kali-linux because it's going to complain that that installation is already there so if I download Kali and try and install it using the default name of Kali Linux it's going to complain because that's already installed so notice we told the distribution with the supplied name already exists use the --name option to choose a different name so all I need to do is specify a name let's say Kali Linux 4 for this example because I've already got other versions of Kali installed over there notice it's been downloaded and now it's being installed and we now told that the distribution has successfully been installed it can be launched via WSL and the distribution name so wsl -d kali-linux in this example three that makes the point really that I can run multiple versions of Kali so I'll open up another PowerShell window notice in the previous window I launched three and here I could specify my username and password so that's KaIi 3 and in this window I could start four so I have multiple instances of the Kali Linux distribution running on Windows so it's not like you're stuck using only one instance of Kali you could have multiple instances of Kali or Ubuntu or other operating systems so on this one specify the username I'll keep it the same and there you go what that means is I could install software on one instance and not on another so if I just search for Kali here that's going to run the default Kali installation so on this one if I type lsb_release -a you can see that we're running release 2025.1 but on this one which is the new installation I'm running 24024.4 so different versions of Kali running on this installation which is the brand new one hashcat is not found but on this one hashcat is available so I could type hashcat -I to get information about the GPU on this computer and scrolling up you can see that the NVIDIA GPU is available but on the new installation hashcat is not found so as you can see there I can install multiple instances of a distribution so I'll open up PowerShell again on this computer here I have these distributions available to me again if I look online I could install other versions of Ubuntu on this Windows computer lots of options available in WSL here's another one i'll start PowerShell wsl --list gives me the list of distributions installed in this case I will start Kali Linux 4 this is a brand new installation so as an example I don't have hashcat installed here if I try and run Firefox we're told that that file doesn't exist so I'll do sudo apt update to update my references and what I'll do is run sudo apt install Firefox ESR to install Firefox so I'm going to say yes to install the software software is now being [Music] installed so now if I run Firefox and I'll put amperand at the end so we get our terminal back notice Firefox is running i could go to the Kali website click download as an example click installer images and I could download the installer as an example I could go to Kali tools Kali documentation etc I am running Firefox as a GUI application from within WSL I am getting an error here so I could do a apt update and then upgrade my operating system notice we've got the option to upgrade I won't do that here let's try and run Wireshark not found so I could say sudo apt install Wireshark and install that please note that in this example I haven't got kex installed go to this part of the video if you want to see how to do that i'm simply installing GUI applications i'll say no for that option about capturing okay Wireshark is now installed so sudo wiresharsk & and notice I have got Wireshark running as a GUI application in WSL this is running within Linux so I'm not running Windows here this is a Linux GUI application so you can see the command output there if I ping kali.org as an example notice the ping succeeds and I see those ICMP packets within Wireshark can see ARP etc etc the IP addresses used here are 172.19.237.126 so IP address you can see that's the IP address
within Kali so I am capturing traffic within WSL using a GUI application in this case Wireshark I'll quit that now I haven't installed Kex so if I run that notice we have to install the Kex application so sudo apt install kali-win-kex I've only installed specific GUI applications on this version of Kali I'll click plus to open up another PowerShell window so wsl --list here let's run the default Kali so I'll just say WSL that'll run this default installation here if I type kex it works because I previously installed kex on this version of Kali Linux but it wasn't installed on the other version so this is a separate installation of Kali I've got multiple Kali installed one is just running Firefox and Wireshark as a GUI application but this one is running the full kex experience and I've installed a bunch of other applications here including Burp Suite so I'll press F8 to allow me to disconnect that session this is a different version of Kali again lsb_release -a shows me that I'm running 2025.1 here whereas here I'm running 2024.4 now back on the laptop at the top if I type exit that'll exit out of Kali I'll clear the screen here wsl --list shows me that I only have Ubuntu and Kali Linux installed again I could type wsl --list online to see online installations so as an example I could say wsl --install Ubuntu-22.04 or whichever distribution you want to install now while that's installing I'll search for Ubuntu in Windows and you can see the Ubuntu app that is the previous version of Ubuntu that we installed it's the default version that's installed when you install WSL so as you can see there actually go jumping back here you can see that this version of Ubuntu 2204 has been installed but back on this release if I type lsb_release -a notice 24.04.2LTS is installed okay so it's asked me for a username i'll specify my username and my password and notice now installation is successful and I've got Ubuntu 22.04 so again lsb_release -a this is the version of Ubuntu on this window so I'm running two versions of Ubuntu now I'm going to show you how to install the GUI on Ubuntu i've already shown you how to install that on Kali so to do that I'm going to type sudo apt update and then sudo apt upgrade press enter and that will update our references and update the software say yes to install the additional [Music] software okay so software is now installed now we need to type sudo apt install and we're going to install our GUI with those options and say y to install the software so that's now being installed okay so that's installed we now need to install xrdp so sudo apt install xrdp and say yes to install the software software is now installed we now need to start the RDP service and enable it we now need to specify our session information so I'm going to do that and for good measure I'll restart the XRDP service ip address shows us the IP address of the server so that's its IP address so I'll copy that and then let's search for remote desktop and I'll put that IP address in and click connect and as you can see we need to say yes to connect to it i'll put in my username and my password and there you go i've got a Ubuntu GUI now running in WSL so as an example I'll maximize this open up the default web browser now it's giving me problems so what I'll do is install Firefox so I can just do that through the CLI so sudo apt install Firefox okay so Firefox is now being installed okay so as you can see Firefox has now been installed so going back to our remote desktop let's see if this works better click on the browser and there you go so I'm going to skip these various steps you could obviously do this better but as an example I'll go to kali.org and
there you go I've got a web browser running within a remote desktop session within WSL in this case Ubunti now I've shown you a whole bunch of options in WSL please let me know in the comments if you've learned something hopefully you've learned to do something new with WSL and see the power of joining Linux and Windows together using WSL let me know if there are any other topics that you want me to cover with regards to WSL such as networking or other topics I'm also thinking about creating a Udemy course which goes into more detail let me know in the comments if you'd like to see that i've also put a link below if you're interested in joining that course I'm David Bombal and I want to wish you all the very
2025-03-28 05:42