Hey guys and welcome back to a new video. As you probably can see it's also a new studio or a redesigned studio
I'm planning to do a lot more video content again and creating a new studio space for myself
was part of the deal for me. And in this video we are going to install Kali Linux on WSL2
but not just Kali Linux. We're also going to install a very cool feature that is called WNKex and that allows
you to run a Kali Linux in GUI version right out of WSL2
I recently published a short, a YouTube short, on that topic. And a lot of you guys ask me to create a guide on how to do this
So this is what this video is going to be. Okay, before you guys go, what the hell is you actually talking about running Kali Linux
in GUI version on WSL2? I'm just going to show you what I mean. So I'm going to open up my Windows Terminal here
And I run WSL2 in Windows Terminal. So this is how my Windows Terminal looks like
I have a whole tutorial series on how to get started with WSL2
and how to get your terminal to look exactly like mine. I will link it in the video description below
There is a three-part written series and there are three videos that you can also follow along to get it installed like this
But a little bit more on it later when we actually talk about how to install Kali Linux on WSL2
Okay, so this is my Windows terminal, as I said. This is Ubuntu. I use Ubuntu for web development
But if I click on this button here, then I have an option here called Kali GUI
And if I click on that, Kali Linux will fire up in the background
And it actually just boot it up, like I didn't start it beforehand or anything
This is how fast it is. Now, this is a fully fledged version of Kali Linux
And you can use all the tools that you would use in a virtual machine as well
But it's running on WSL2. And because it's running on WSL2, it is really, really fast
Now I have played around with it just a little bit yet. I didn't do any performance tests
But as far as I can tell, it's really, really fast and really well performing
And you can play around with the RAM allocation. But as of now, it actually has automatically assigned 16 gigabytes of RAM to that automatically
And I think this depends on how many virtual or how many instances of WSL you run
But since I don't run any other instances, it probably took half of my memory because I have 32
gigabytes of RAM in my computer so it took 16 gigabytes and you can also see I don't
know if you see the course here but we don't but the CPU usage is really low as I said I
didn't do a particular performance test but I played around with it a bit and I didn't
see any hiccups or any lags or anything really so you can use of course you can
use your terminal inside of Kali Linux it's a little bit of an inception going on here
but I have Fuff installed I played around with that a little bit and you can use anything
really and if you just look how quickly the browser starts and how you can let's see let's go to
google it's all working like really fast and snappy and i really really like that i actually prefer
it over a virtual machine um because it's also i think it's a little bit faster i don't know
i i didn't spend enough time with it yet um if you press f8 in here this opens up the windcags
the context menu and you can undo full screen so you could just go ahead and you can even run multiple instances of that and put it next to each other however you want
But for this, it's a really cool feature and you also can press F8 and then you can go on I think, yeah, disconnect
You have a couple of other options here, but you can just click on disconnect and this will close the window
Then it will ask you do you want to reconnect? If you press Y, it will just reopen that
So you could just close it in the background. The session is still active. If I press Y now, then it should open up immediately
If I press F8 once more and I disconnect again and then I press no, then it's actually going to shut down the machine and it's closing the tab
Okay, but now let's actually talk about how we are going to install all of that
You probably think it's terribly complicated to do all of this. And I can just tell you it isn't
It's really, really easy. So let's walk through step by step. So as I previously mentioned guys to install WSL2 and Windows Terminal and to get all that set up there is already a three-part tutorial series and it would make this video too long
So I would like to point you to this tutorial if you go to my website zeosec.com
You click on categories and then on WSL2 you will find all WSL2 related content as I said there is also a video on this channel that I will link in the upper right corner for you guys right now
That you can follow along if you prefer that but what I want you to do is I want you to use this to
tutorial, install WSL2 on Windows, a complete step-by-step tutorial. Just open that up
Again, it's in the video description below. And I want you to follow through with this tutorial
If you haven't set up Windows Terminal and WSL2 yet, of course
here the table of contents and I want you to basically go until the end of this tutorial if you haven set it up yet Because for this to work you actually need or you should have uh Windows terminal installed that you have it exactly like I have it so I highly recommend you guys doing all of those steps and also installing Windows
Terminal and configuring it this is an important part so that you are able to follow
along in the next steps all right guys I hope you didn't have too much trouble
following along with installing and getting WSL 2 and Windows Terminal all set up
let's go ahead and install kali linux so press the windows key and type in store to open the
microsoft store now you can also install that using power shell of course but i found sometimes
there are some issues when i do it that way so i usually go and search it here so i shall
search for kali linux up here and you'll find the kali linux app and then you just click on install
now it's downloading it and installing it and it should just take a couple of
of seconds it's 200 megabytes and once that download is finished let's just wait for it then another
window pops up that requires you to set up a username and a password so let's wait for that to finish
should be just a couple of seconds come on there we go now it's installing and um probably not going to
open by itself so I'm just going to click on open here yeah there we go so you have to click
going to open let's close that up drag that in here and I cannot make it bigger
unfortunately now so now it's asking for a username so I'm going to enter a
username and then you enter a password there we go and that's it now you get
a message here this is a minimal installation of Kylinux you likely want to
install supplementary tools learn how and this is what we are going to check
out in just a second for now I want you guys to quickly go ahead and restart your computer because this helps us to get
set up with Windows Terminal easier than adding this profile manually. There are sometimes
if you install a new distribution then it will not be right visible inside of Windows Terminal
so usually a quick reboot help so let's just do that and meet back here when we are done
Let's see if that worked last time it didn't. Let's check it. Okay let's open up Windows Terminal
guys and see if we can access kali linux from here already first startup always takes a couple of
seconds okay let's check and yes no it didn't like this is the problem still what i see with
windows terminal occasionally if you uninstall something and reinstall it it sometimes can mess up your
your profiles here but for you guys you should see kali minus linux here right now if you just installed it for
first time should it not show up for you guys you can simply fix that by clicking on add a new profile
and then it's actually here for me but i cannot see it so this is what i'm talking about now i have it
three times here and i just click on duplicate here but what i want you to do is to click on add
new profile and then a new empty profile just in case it doesn't show up right and then you can
name that calli and then what you want to do you want to do you want to do you want to do you to put in here is actually a WSL oops WSL dot Xe minus D for distribution and Kali minus
Linux can change the icon if you really wanted to and I give it a tap title
Kali whatever and then click on safe and once you do that you can access it from here
now since I have definitely enough of those already so I'm gonna just open up any
now this is gonna open up all the same and now we are in
of Kali Linux. So we do the first thing, first thing, we are going to make this a lot bigger and we see the into the root directory
You can see this warning here, we are going to get rid of it later or I'm pretty sure you can do this by your own, right
So I'll leave that to you. And then we do pseudo apt and update and then we type in our password
Da da da da da da da da. Fetching, fetching. 70 packages can be upgraded. So we do pseudo appellate. So we do so
do apt upgrade upgrade and no no upgrade okay yes so I quickly let it to be installed
and then we continue with installing some calli meta packages actually while
that is running we can have a look at that directly so I open up my browser here and I
think I have it opened carly meta yeah there we go so there are the calli meta tools
and this is specifically for minimal installations and if you remember it told us that this is like a core installation thing
so what I usually want to do first is I want to install the Kali tools top 10
now this Kali meta page here you can find that on the Kali website
this describes all of the Kali meta packages and if you look through that and if you click on dependencies you can actually see which kind of tools it will install so those are tools I regularly use and I like this package I don like to have a bloated version of a bunch of tools I don even use at all
So I usually really like to do that and just install the top tools or whatever
Just install the tools that I want. I'm basically not using Kali Linux at all
I'm using Ubuntu even for hacking. So once we have pseudo app updated and upgraded, we can go ahead and we can go ahead
then we can do pseudo apt install and then it was called Kali minus tools minus top 10
and if we click on enter it should find that and this is a 2.5 gigabyte large package
and yeah whatever just let's install it and quickly wait for that by the way guys just a quick
shameless plug while this is installing here if you're interested in learning more about
WSL2. I'm very close to releasing a complete WSL2 course for web development and ethical hacking
over at Udeme and you will learn when this course will be released over at Twitter, probably within
the next couple of weeks. And this course actually covers a lot of stuff that we just go through
here. It will cover this very section where we install Kali Linux and all kinds of tools
and I will show you my ethical hacking workflow and you will learn everything you need to know about
WSL2 and especially if you're a web developer this will be very useful to boost your productivity
there's also a bunch of bonus sections in there like a Linux primer Linux basics and so on
okay let's continue with the configuration here configuring right I don't care about any of that right now
I'm not going to configure anything so now it's installing let's meet here when it's done
Oh and by the way guys have you heard about NordVPN yet? No I'm just joking sorry
Okay, that looks good. We have that installed now the next thing we need to do is we need to actually install a desktop
environment so we can then use a GUI right so for that I'm going to install the default
XFCE desktop environment so it's pseudo app to install Kali minus desktop minus Xfce minus Y
Okay, alright, let's install it another 400 megabytes. Okay, be right back
Ah, finally. Oh my god, that took so long. Okay, keyboard layout. Choose whatever you want. It's just really for the GUI
I know I know, but he's doing those videos. They take so long. Jokes aside. Let's continue. Okay, we have everything set up. We can now go ahead and do pseudo app install minus Y Kali win Kex. And this is the actual tool that we want to install to run our GUI. So let's do that. Please not another
Half an hour. Come on. Okay, this is much faster. I like it
Okay, now I'm starting WynCACS, we can start it right from the terminal and let's copy and paste that command here
So you can always start it right out of the shell by doing CECS minus minus Wynn minus S and if you hit that, you need to enter a password
It requires you to enter a password just for safety. Uh, most bit least six characters. Okay, so we do. What do we do
Uh, da, da, da, da, da, da. That will not work. I do 666, 666, 6, 6, 6. 6. 6. 6. 6. 6
Come on. Would you like to enter a view only password? No
No, no password. Yes. Okay. And there we go. It's starting. Yes. We are inside
plug-in power manager I expect you left the panel you want to restart it okay
okay yeah I don't know what that is remove there we go okay it's quiet now
now this is obviously this is the same thing that I have showed you in the
beginning of the video if you press F8 it opens up the context menu if you don't
run some other tools that are blocking it in my case it's this screenshot tool
just give me one second to clean that up come on yes okay for it back up and now f8 should work
and we can click disconnect to get out of there again and then we are where we have or what we have
seen before now the next thing we need to do is we need to integrate we need to integrate the whole
GUI into Windows terminal and how do we do that we do that by editing the settings here so we
go to this error thing again And we go on settings and then we need to open this JSON file You can open that in your favorite code editor or in just plain simple notepad
I'm going to try to move that in here. And yeah, then we see we need to add some entry here
And we scroll down until we find this list of profiles. So we go until profiles
There are some default set. You can play wrong with that too
want and here is this list it's an array of objects and we see a bunch of things here so we can see
this is our power shell this is our command line CMD then we have the azure cloud shell thingy
and if we go a little bit more we should find this is my Ubuntu this is the other
Ubuntu and where it is here so we have this Kali Linux object here and we have a GUI-I-D-D
and this is what we need to actually launch that. So how we do that is we add a new object here
and I'm going to copy and paste that from my script. And you just put a comma on the end of the last entrance
on the end of the last curly brace of this object, and you just write in this code here
or you just pause the video and type it off. So GUID, you need to put the GUID of your Kali instance
you copy that simply including the curly braces and it stays a string so you just copy that in here
and you can see this is the same uid and this is probably some leftover of my old kali installation
which i can now remove i don't need it anymore and then is a hidden attribute that it's false and
the name for that is kali gui and that's what i show you in the beginning of the video and then there
is the command line uh command that fires that up basically it's
It's almost the same. It's WSL minus D for distribution Kali Linux and then Kex minus WT start minus S
This is what we want. Control S for save, close it. And it says, yeah, this is just an error that we got before we change the value here so we
can ignore that. And just for good measure, let's close, actually not, don't press close, press safe first
just for good measure. And then click close, close all windows and let's restart WSL2 here
and let's drag that thing again in the middle then open up our menu and we should see calligui
and we do see calligui and if everything went right so far
and we did not make any mistakes and we click on calligui boom there we go
cali Linux right inside or on top of wSL 2 we made it we are there again
and this works as i have showed you in the beginning of this video
and now you can go ahead and install stuff as you want in here you can play
around with the context menu by pressing F8 and do it not full screen just drag it
around a little bit as I said it's automatically adjusting and yeah then you
basically have it set up you can always close it here and not to reinitiate
the connection but then go back to your initial shell which is not in there
for me anymore because it's again messed up probably so I'm just gonna add a
new profile here and I do just a copy of this this Kali Linux thing
Click and save and I go back to my shell. And this is the same shell that you would have inside of the GUI
So you can now also go ahead and install your stuff here. If you want to install tools, you don't always need to fire up the GUI version of Kali
You can install that right inside of this shell too. And what else you can do now is you can use burpsuit
If you have installed the top 10 tools or burpsuit, you can press Windows key and you type burp
Like I showed you in the beginning of the video, video now this might be bugging out no it doesn't because I reinstalled it so it's firing up
it's working as intended and yeah that's it guys I really hope you made it so far and I would
be really happy to know what you guys think about this after you have been using it for a while
performance wise especially let me know in the comments below what you think okay guys I
I really hope you did enjoy this little video on Kali Linux in W
As I said, the WSL2 course is coming out very soon. You can be excited for that, especially if you're looking into a better workflow for your programming or web development
In this course we cover JavaScript, web development, Python, everything there is to know about working with WSL2 on a daily basis
As well as the Isicle hacking part, it is included in the course. And I think it will raise your productivity quite a bit
Let me know what you guys think. Let me know what you think about in your studio. if you like the new environment and I'll see you back in the next one thanks for watching guys
until then