Kali Linux with GUI on WSL2
31K views
Jul 16, 2022
Learn how to install Kali Linux with GUI on WSL2. WSL2 Tutorial Series:https://www.ceos3c.com/wsl-2/install-wsl2-with-windows-terminal/ ⮘-=[⭐All important links in one place⭐]=-⮚ ↬ https://linktree.stefanrows.com ⮘-=[⭐All the stuff I use | Stefan's Amazon Store⭐]=-⮚ ↬ https://www.amazon.com/shop/ceos3ctutorials ⮘-=[⭐Join this channel to get access to perks⭐]=-⮚ https://www.youtube.com/channel/UCDqZyVCTwg9UyRWKgQ7Gizg/join ⮘-=[Subscribe]=-⮚ ↬ https://www.youtube.com/stefanrows?sub_confirmation=1 ⮘-=[Sign Up to my popular 5-Bullet-Friday Newsletter]=-⮚ ↬http://eepurl.com/cNJ_Dj ⮘-=[100$ Credit on Digital Ocean for your VPS Droplet]=-⮚
View Video Transcript
0:00
Hey guys and welcome back to a new video. As you probably can see it's also a new studio or a redesigned studio
0:08
I'm planning to do a lot more video content again and creating a new studio space for myself
0:14
was part of the deal for me. And in this video we are going to install Kali Linux on WSL2
0:22
but not just Kali Linux. We're also going to install a very cool feature that is called WNKex and that allows
0:30
you to run a Kali Linux in GUI version right out of WSL2
0:35
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
0:42
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
0:49
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
0:55
And I run WSL2 in Windows Terminal. So this is how my Windows Terminal looks like
1:01
I have a whole tutorial series on how to get started with WSL2
1:05
and how to get your terminal to look exactly like mine. I will link it in the video description below
1:10
There is a three-part written series and there are three videos that you can also follow along to get it installed like this
1:17
But a little bit more on it later when we actually talk about how to install Kali Linux on WSL2
1:23
Okay, so this is my Windows terminal, as I said. This is Ubuntu. I use Ubuntu for web development
1:28
But if I click on this button here, then I have an option here called Kali GUI
1:33
And if I click on that, Kali Linux will fire up in the background
1:38
And it actually just boot it up, like I didn't start it beforehand or anything
1:42
This is how fast it is. Now, this is a fully fledged version of Kali Linux
1:47
And you can use all the tools that you would use in a virtual machine as well
1:52
But it's running on WSL2. And because it's running on WSL2, it is really, really fast
1:58
Now I have played around with it just a little bit yet. I didn't do any performance tests
2:03
But as far as I can tell, it's really, really fast and really well performing
2:09
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
2:18
And I think this depends on how many virtual or how many instances of WSL you run
2:23
But since I don't run any other instances, it probably took half of my memory because I have 32
2:28
gigabytes of RAM in my computer so it took 16 gigabytes and you can also see I don't
2:34
know if you see the course here but we don't but the CPU usage is really low as I said I
2:39
didn't do a particular performance test but I played around with it a bit and I didn't
2:43
see any hiccups or any lags or anything really so you can use of course you can
2:48
use your terminal inside of Kali Linux it's a little bit of an inception going on here
2:52
but I have Fuff installed I played around with that a little bit and you can use anything
2:58
really and if you just look how quickly the browser starts and how you can let's see let's go to
3:04
google it's all working like really fast and snappy and i really really like that i actually prefer
3:09
it over a virtual machine um because it's also i think it's a little bit faster i don't know
3:16
i i didn't spend enough time with it yet um if you press f8 in here this opens up the windcags
3:23
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
3:35
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
3:43
You have a couple of other options here, but you can just click on disconnect and this will close the window
3:47
Then it will ask you do you want to reconnect? If you press Y, it will just reopen that
3:52
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
4:00
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
4:09
Okay, but now let's actually talk about how we are going to install all of that
4:14
You probably think it's terribly complicated to do all of this. And I can just tell you it isn't
4:20
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
4:32
So I would like to point you to this tutorial if you go to my website zeosec.com
4:36
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
4:47
That you can follow along if you prefer that but what I want you to do is I want you to use this to
4:53
tutorial, install WSL2 on Windows, a complete step-by-step tutorial. Just open that up
4:59
Again, it's in the video description below. And I want you to follow through with this tutorial
5:04
If you haven't set up Windows Terminal and WSL2 yet, of course
5:09
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
5:28
Terminal and configuring it this is an important part so that you are able to follow
5:33
along in the next steps all right guys I hope you didn't have too much trouble
5:38
following along with installing and getting WSL 2 and Windows Terminal all set up
5:44
let's go ahead and install kali linux so press the windows key and type in store to open the
5:49
microsoft store now you can also install that using power shell of course but i found sometimes
5:57
there are some issues when i do it that way so i usually go and search it here so i shall
6:03
search for kali linux up here and you'll find the kali linux app and then you just click on install
6:10
now it's downloading it and installing it and it should just take a couple of
6:14
of seconds it's 200 megabytes and once that download is finished let's just wait for it then another
6:22
window pops up that requires you to set up a username and a password so let's wait for that to finish
6:30
should be just a couple of seconds come on there we go now it's installing and um probably not going to
6:40
open by itself so I'm just going to click on open here yeah there we go so you have to click
6:44
going to open let's close that up drag that in here and I cannot make it bigger
6:51
unfortunately now so now it's asking for a username so I'm going to enter a
6:56
username and then you enter a password there we go and that's it now you get
7:03
a message here this is a minimal installation of Kylinux you likely want to
7:07
install supplementary tools learn how and this is what we are going to check
7:11
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
7:20
set up with Windows Terminal easier than adding this profile manually. There are sometimes
7:25
if you install a new distribution then it will not be right visible inside of Windows Terminal
7:32
so usually a quick reboot help so let's just do that and meet back here when we are done
7:36
Let's see if that worked last time it didn't. Let's check it. Okay let's open up Windows Terminal
7:43
guys and see if we can access kali linux from here already first startup always takes a couple of
7:50
seconds okay let's check and yes no it didn't like this is the problem still what i see with
7:57
windows terminal occasionally if you uninstall something and reinstall it it sometimes can mess up your
8:06
your profiles here but for you guys you should see kali minus linux here right now if you just installed it for
8:13
first time should it not show up for you guys you can simply fix that by clicking on add a new profile
8:21
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
8:28
three times here and i just click on duplicate here but what i want you to do is to click on add
8:34
new profile and then a new empty profile just in case it doesn't show up right and then you can
8:40
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
8:53
Linux can change the icon if you really wanted to and I give it a tap title
8:58
Kali whatever and then click on safe and once you do that you can access it from here
9:04
now since I have definitely enough of those already so I'm gonna just open up any
9:08
now this is gonna open up all the same and now we are in
9:13
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
9:21
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
9:28
So I'll leave that to you. And then we do pseudo apt and update and then we type in our password
9:35
Da da da da da da da da. Fetching, fetching. 70 packages can be upgraded. So we do pseudo appellate. So we do so
9:43
do apt upgrade upgrade and no no upgrade okay yes so I quickly let it to be installed
9:55
and then we continue with installing some calli meta packages actually while
10:00
that is running we can have a look at that directly so I open up my browser here and I
10:05
think I have it opened carly meta yeah there we go so there are the calli meta tools
10:12
and this is specifically for minimal installations and if you remember it told us that this is like a core installation thing
10:19
so what I usually want to do first is I want to install the Kali tools top 10
10:24
now this Kali meta page here you can find that on the Kali website
10:28
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
10:47
So I usually really like to do that and just install the top tools or whatever
10:53
Just install the tools that I want. I'm basically not using Kali Linux at all
10:58
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
11:04
then we can do pseudo apt install and then it was called Kali minus tools minus top 10
11:11
and if we click on enter it should find that and this is a 2.5 gigabyte large package
11:19
and yeah whatever just let's install it and quickly wait for that by the way guys just a quick
11:26
shameless plug while this is installing here if you're interested in learning more about
11:31
WSL2. I'm very close to releasing a complete WSL2 course for web development and ethical hacking
11:39
over at Udeme and you will learn when this course will be released over at Twitter, probably within
11:47
the next couple of weeks. And this course actually covers a lot of stuff that we just go through
11:53
here. It will cover this very section where we install Kali Linux and all kinds of tools
11:59
and I will show you my ethical hacking workflow and you will learn everything you need to know about
12:05
WSL2 and especially if you're a web developer this will be very useful to boost your productivity
12:11
there's also a bunch of bonus sections in there like a Linux primer Linux basics and so on
12:17
okay let's continue with the configuration here configuring right I don't care about any of that right now
12:22
I'm not going to configure anything so now it's installing let's meet here when it's done
12:27
Oh and by the way guys have you heard about NordVPN yet? No I'm just joking sorry
12:34
Okay, that looks good. We have that installed now the next thing we need to do is we need to actually install a desktop
12:41
environment so we can then use a GUI right so for that I'm going to install the default
12:50
XFCE desktop environment so it's pseudo app to install Kali minus desktop minus Xfce minus Y
12:57
Okay, alright, let's install it another 400 megabytes. Okay, be right back
13:27
Ah, finally. Oh my god, that took so long. Okay, keyboard layout. Choose whatever you want. It's just really for the GUI
13:37
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
13:57
Half an hour. Come on. Okay, this is much faster. I like it
14:03
Okay, now I'm starting WynCACS, we can start it right from the terminal and let's copy and paste that command here
14:12
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
14:20
It requires you to enter a password just for safety. Uh, most bit least six characters. Okay, so we do. What do we do
14:29
Uh, da, da, da, da, da, da. That will not work. I do 666, 666, 6, 6, 6. 6. 6. 6. 6. 6
14:41
Come on. Would you like to enter a view only password? No
14:45
No, no password. Yes. Okay. And there we go. It's starting. Yes. We are inside
14:53
plug-in power manager I expect you left the panel you want to restart it okay
14:58
okay yeah I don't know what that is remove there we go okay it's quiet now
15:08
now this is obviously this is the same thing that I have showed you in the
15:11
beginning of the video if you press F8 it opens up the context menu if you don't
15:17
run some other tools that are blocking it in my case it's this screenshot tool
15:23
just give me one second to clean that up come on yes okay for it back up and now f8 should work
15:32
and we can click disconnect to get out of there again and then we are where we have or what we have
15:39
seen before now the next thing we need to do is we need to integrate we need to integrate the whole
15:45
GUI into Windows terminal and how do we do that we do that by editing the settings here so we
15:51
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
16:05
I'm going to try to move that in here. And yeah, then we see we need to add some entry here
16:14
And we scroll down until we find this list of profiles. So we go until profiles
16:19
There are some default set. You can play wrong with that too
16:24
want and here is this list it's an array of objects and we see a bunch of things here so we can see
16:31
this is our power shell this is our command line CMD then we have the azure cloud shell thingy
16:37
and if we go a little bit more we should find this is my Ubuntu this is the other
16:45
Ubuntu and where it is here so we have this Kali Linux object here and we have a GUI-I-D-D
16:54
and this is what we need to actually launch that. So how we do that is we add a new object here
17:01
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
17:09
on the end of the last curly brace of this object, and you just write in this code here
17:16
or you just pause the video and type it off. So GUID, you need to put the GUID of your Kali instance
17:24
you copy that simply including the curly braces and it stays a string so you just copy that in here
17:30
and you can see this is the same uid and this is probably some leftover of my old kali installation
17:37
which i can now remove i don't need it anymore and then is a hidden attribute that it's false and
17:43
the name for that is kali gui and that's what i show you in the beginning of the video and then there
17:49
is the command line uh command that fires that up basically it's
17:54
It's almost the same. It's WSL minus D for distribution Kali Linux and then Kex minus WT start minus S
18:01
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
18:11
can ignore that. And just for good measure, let's close, actually not, don't press close, press safe first
18:18
just for good measure. And then click close, close all windows and let's restart WSL2 here
18:24
and let's drag that thing again in the middle then open up our menu and we should see calligui
18:31
and we do see calligui and if everything went right so far
18:35
and we did not make any mistakes and we click on calligui boom there we go
18:40
cali Linux right inside or on top of wSL 2 we made it we are there again
18:46
and this works as i have showed you in the beginning of this video
18:50
and now you can go ahead and install stuff as you want in here you can play
18:54
around with the context menu by pressing F8 and do it not full screen just drag it
19:01
around a little bit as I said it's automatically adjusting and yeah then you
19:05
basically have it set up you can always close it here and not to reinitiate
19:11
the connection but then go back to your initial shell which is not in there
19:16
for me anymore because it's again messed up probably so I'm just gonna add a
19:21
new profile here and I do just a copy of this this Kali Linux thing
19:25
Click and save and I go back to my shell. And this is the same shell that you would have inside of the GUI
19:33
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
19:40
You can install that right inside of this shell too. And what else you can do now is you can use burpsuit
19:47
If you have installed the top 10 tools or burpsuit, you can press Windows key and you type burp
19:52
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
19:59
it's working as intended and yeah that's it guys I really hope you made it so far and I would
20:08
be really happy to know what you guys think about this after you have been using it for a while
20:14
performance wise especially let me know in the comments below what you think okay guys I
20:18
I really hope you did enjoy this little video on Kali Linux in W
20:24
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
20:34
In this course we cover JavaScript, web development, Python, everything there is to know about working with WSL2 on a daily basis
20:43
As well as the Isicle hacking part, it is included in the course. And I think it will raise your productivity quite a bit
20:51
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
20:58
until then
#Internet Software