How to Install WSL and Docker For Cyber Security Homelab ?

This entry is part 5 of 5 in the series Setting up Your Cyber Security HomeLab

Setting up Your Cyber Security HomeLab

How To Create Your First Virtual Machine In 2025?

Setting up a cyber security home lab is not an easy task, but it’s not that complex either. In this part, we are going to install WSL and Docker on our machine. If you don’t have a high-configuration computer at your hands, WSL and Docker become really important for setting up your home lab. Why?

With WSL, you can install multiple Linux distributions with ease and without any huge specifications. While using Docker, you can compose multiple cyber security applications that you can practise with. So, this part is specifically dedicated to low-end users who don’t have a high-configuration machine at their fingertips but still want to set up a simple home lab, which they can start practising with for their cybersecurity career.




Installing WSL

WSL stands for Windows Subsystem for Linux, and it is a feature of Windows that allows you to run a Linux distribution on your Windows machine. It’s just like its name: Windows Subsystem for Linux. With WSL, you can install various Linux distributions with ease and minimal overhead.

Installing WSL is very straightforward and simple. All you have to do is open up your terminal (PowerShell in case you do not have the Terminal application) and write the following command:

wsl --install

The simple command you see above is what you need to install the whole Windows Subsystem for Linux. Really, it’s that simple. Just run the command above, and all of the dependencies, configurations, and optional features required for WSL will be automatically installed.

To check if the WSL installation was successful, you can run the following command:

wsl -v

If the WSL installation was successful and you have the latest Windows Subsystem for Linux, you should see the following output:

PS C:\Users\krish> wsl -v
WSL version: 2.6.3.0
Kernel version: 6.6.87.2-1
WSLg version: 1.0.71
MSRDC version: 1.2.6353
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.26200.7462

Do note that you should have WSL2. By default, a Windows operating system gets installed with WSL1, and it needs to be updated. If you executed the first command wsl --install, most probably, you will have WSL2. You can see in the WSL version above: WSL version: 2.6.3.0. The version starts with 2.*. This means we have WSL2 installed, and we are good to go.

In case you have WSL2, you can update the WSL by executing the following command:

wsl --update

The above command is going to update the current WSL to its latest version, so that you can install the latest distributions without any problem.

Which Linux distributions can be installed in WSL ?

There is a huge list of Linux distributions that WSL supports. To check the full list, you can write the command below:

wsl --list -o

This is going to show you a long list of Linux distributions that you can install using WSL. Just to show you what that list actually looks like, here is the output of the above command:

PS C:\Users\krish> wsl --list -o
The following is a list of valid distributions that can be installed.
Install using 'wsl.exe --install <Distro>'.

NAME                            FRIENDLY NAME
Ubuntu                          Ubuntu
Ubuntu-24.04                    Ubuntu 24.04 LTS
openSUSE-Tumbleweed             openSUSE Tumbleweed
openSUSE-Leap-16.0              openSUSE Leap 16.0
SUSE-Linux-Enterprise-15-SP7    SUSE Linux Enterprise 15 SP7
SUSE-Linux-Enterprise-16.0      SUSE Linux Enterprise 16.0
kali-linux                      Kali Linux Rolling
Debian                          Debian GNU/Linux
AlmaLinux-8                     AlmaLinux OS 8
AlmaLinux-9                     AlmaLinux OS 9
AlmaLinux-Kitten-10             AlmaLinux OS Kitten 10
AlmaLinux-10                    AlmaLinux OS 10
archlinux                       Arch Linux
FedoraLinux-43                  Fedora Linux 43
FedoraLinux-42                  Fedora Linux 42
Ubuntu-20.04                    Ubuntu 20.04 LTS
Ubuntu-22.04                    Ubuntu 22.04 LTS
OracleLinux_7_9                 Oracle Linux 7.9
OracleLinux_8_10                Oracle Linux 8.10
OracleLinux_9_5                 Oracle Linux 9.5
openSUSE-Leap-15.6              openSUSE Leap 15.6
SUSE-Linux-Enterprise-15-SP6    SUSE Linux Enterprise 15 SP6

As you can see above, the list goes a long way, and there are multiple Linux distributions that you can install on WSL. Now the only thing left is installing an actual Linux distribution on your Windows machine. So, let us get started with that.

Installing Multiple Linux distros using WSL

Till now, the installation has been really simple, but now it is going to get a little complex from here. This is because now you have to make a really important decision: which Linux distro are you actually going to install? Hahaha 😂. Yeah, I mean there is a heck ton of Linux distros available for you to install; doesn’t that make it more challenging for you to settle on one? Hahah 😂.

So now, I am going to show you how you can install a Linux distro in WSL. Just for the sake of this blog and to stop my curiosity, I’m going to be settling on three Linux distributions. Which Linux distros are we going to install?

  • Kali Linux
  • Ubuntu
  • AlmaLinux-Kitten-10

Okay, we have talked a lot now lets get straight into installing these distributions. To install a distribution in wsl all you have to do is write this simple command :

wsl --install -d <name of the distro>

Okay, we have talked a lot; now let’s get straight into installing these distributions. To install a distribution in WSL, all you have to do is write this simple command:

Remember: The name of the distribution should match the spelling of the distro that you see on the distro list above using wsl --list -o commad

Installing Kali Linux on WSL

So first, I am going to install Kali Linux :

wsl --install -d kali-linux

Now, when you run the above command, it is going to download the Kali Linux Rolling version. Then, it is going to install Kali Linux and ask for a username and password. I think you know how to set a username and password, so I don’t have to explain that to you 😊.

Installing Ubuntu on WSL

Now, the process is just the same as installing Kali Linux. All you have to do is write the install command again and just change the distribution name.

wsl --install -d ubuntu

Installing AlmaLinux-Kitten-10 on WSL

The installation is very straightforward. You just have to write the installation command again and change the distribution name, as we did in the above sections.

wsl --install -d AlmaLinux-Kitten-10

Now we have successfully installed three different Linux distributions on WSL. You can practise with each one of them and get familiar with their environment, or you can install more distributions according to your needs. The possibilities are endless, and it stops with you!

Moving on, we have successfully installed WSL. Now the only thing left to install is Docker.

Installing Docker on Windows 11

Now, the concept of containerization is very new, and it is one of the best things of this decade 😆. Docker is one of the most famous containerization software out there that everyone must have heard of.

Just imagine being able to deploy software again and again, delete them whenever you want, and again create them with just a single command. It is really a great tool in good hands, and I know your hands are good 🤨 heheh 😂.

Okay, anyways, you must have known about Docker. At least you must have heard of it somewhere in life. So now, we are going to install Docker on your Windows machine, and the installation is really, really easy.

All you have to do is go to the Docker website and download the executable. Here is the link if you don’t want to Google the Docker installation.

Download Docker Desktop

Just click the link above, which will take you to Docker’s official website. Download the executable for Windows 11. Most probably, if you are using Windows 11, you should be downloading the AMD64 executable.

From here on, just run the executable and install Docker Desktop just like any other software that you install.

Checking the Docker Installation

If Docker Desktop has been successfully installed, you should be able to see a version of it in your terminal. To check if the installation was successful and Docker is properly running on your system, you can write the command below on your Windows terminal:

docker -v

When you write the above command, you should see output just like this:

PS C:\Users\krish> docker -v
Docker version 29.1.3, build f52814d

If you see a similar output, that means everything has gone smoothly and the installation was successful. In case you don’t see any version of Docker when running the above command, there is something wrong. Now, either you should restart your system or install Docker Desktop again.

Leave a Reply