Getting Started With Windows Subsystem for Linux

What if I told you that you could easily install a complete Ubuntu terminal environment in minutes on Windows with Windows Subsystem for Linux (WSL)? Yes, this is possible if you do own a Windows 10 and above machine.

Windows Subsystem for Linux (WSL) is a compatibility layer for running Linux binary executables (in ELF format) natively on Windows 10, Windows 11, and Windows Server 2019. In May 2019, WSL 2 was announced, introducing important changes such as a real Linux kernel, through a subset of Hyper-V features.

Advertisement - Continue reading below

Wait, What is ELF?

In computing, the Executable and Linkable Format (ELF, formerly named Extensible Linking Format), is a common standard file format for executable files, object code, shared libraries, and core dumps.

I am currently running a dual boot of Windows 10 & Ubuntu 20 LTS. On my Windows system, I happen to also have Kali Linux installed from Microsoft Store as an app! I did this by first enabling WSL features. 

I happen to also have a Virtual Machine (Oracle) that I also use for testing some distros. Running a Linux natively gives more superpowers than just a VM or WSL, but in this article, we shall see how to get started with WSL

Pre-Requisites 

You must be running Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11. 

Note: To check your Windows version and build number, select Windows logo key + R, type “winver“,

Advertisement - Continue reading below

Press enter and this will pop up with the information about your windows version.

Windows 10 Version

You can also update to the latest Windows version by selecting Start > Settings > Windows Update > Check for updates.

Is Windows Subsystem for Linux free? 

WSL, the Windows Subsystem for Linux, is a free, optional feature of Windows 10 that allows Linux programs to run on Windows. It provides you with a Windows version of the bash shell and a compatibility layer that permits many Linux programs to run natively on your Windows machine.


Related


Installation

Be sure to enable the Windows Subsystem for Linux optional feature before installing the Kali Linux app! Let’s enable it;

Search for “Turn Windows features on or off” in the start bar;

SearchBar: Windows 10

Enable WSL as shown below, you may also enable Windows Hypervisor Platform & Virtual Machine Platform. The last two are optional.

And what is a hypervisor?

A hypervisor, also known as a virtual machine monitor or VMM, is software that creates and runs virtual machines (VMs). A hypervisor allows one host computer to support multiple guest VMs by virtually sharing its resources, such as memory and processing. 

So you would basically need to enable this when installing the Virtual Machine.

Advertisement - Continue reading below

Now launch Microsoft Store and search for Kali and install it, this might take some time.

The Kali for Windows application allows one to install and run the Kali Linux open-source penetration testing distribution natively, from the Windows 10 OS. To launch the Kali shell, type “kali” on the command prompt, or click on the Kali tile in the Start Menu.

The base image does not contain any tools, or a graphical interface in order to keep the image small, however, these can be installed via apt commands very easily. For more information about what you can do with this app, check https://www.kali.org/kali-on-windows-app.

Note: 

Some tools may trigger Antivirus warnings when installed, please plan ahead accordingly. Make sure to visit our Kali on the WSL tutorial page here.

What exactly is Kali Linux?

Kali is a Debian-based Linux distro aimed at advanced penetration testing and security auditing.

If you need extra help, read the official documentation here to fix any errors that may arise.

Test the distro by typing ‘ls’ in the terminal;

You can also start WSL by the normal terminal, open the “command prompt“, and type ‘bash’ to switch to Kali directly in the same shell.

While WSL is a fine product, there are still situations where running a full Linux distro on the desktop can be better.

Conclusion

WSL could be an ideal introduction to Linux for people who know nothing about it. They can get familiar with Linux commands without having to fully install a new operating system.

If you are going to use them (Operating Systems) as isolated or networked systems, go with the VM. If you want to use Linux commands on your Windows system (to actually affect the files on your Windows machine) easily, use WSL. And if you want the native power of the distro, install it on its own.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.