Home Free Hacking Tools WSL- Running Linux on Windows

WSL- Running Linux on Windows

by Tyler Loftus

What is WSL?

Some of you may have noticed that I have been running my commands in an Ubuntu window on my Linux machine. I’m here today to tell you about this awesome tool from Windows that allows users to run a GNU/Linux environment directly on Windows without having to dualboot or even install a virtual machine.

WSL gives you the capability to run command-line tools and ELF-64 binaries. You can install tools like git, tmux, vim and Nano. Running Bash shell scripts and Linux applications like PostgreSQL, MySQL are other features included in WSL as well as language capability for Python, Ruby, Rust and many more. This tool even lets you run Windows applications using Linux commands! So much fun!

Check out this video from Microsoft.

What is WSL2?

WSL2 is a newer version of the Windows Subsystem for Linux. Its primary goal was to increase filesystem performance and add full system call compatibility. It runs the same way as WSL it just allows for the use of more robust file system commands and how the Linux filesystem is stored on your Windows hard drive. WSL and WSL2 allow for use of a real Linux kernel, WSL2 utilizes the kernel much more efficiently. Linux distributions can be run on either WSL or WSL2 and can be upgraded or downgraded at any time.

Installing WSL

Installation is pretty easy on this one but there are some prerequisites that need to be checked first. First you will need admin privileges to install this so make sure you have that ability. Next you need to navigate to the About my PC section of the settings app. Verify your system is running OS Build 19041 or higher like shown below:

Once you verify your OS build you need to open a PowerShell window as an administrator. You can do this by right-clicking the Windows icon in the task bar and selecting Windows PowerShell (Admin) and running wsl –install.

WSL2 and WSL will be installed after running this command but WSL2 will be enabled by default. Ubuntu will be downloaded and set as your default distribution as well. You can change the default distribution by using the -d flag on the install command.

There are many different distributions in the Microsoft Store but you can also import a custom distribution or create your own.

Next you just need to open the distribution app from the start menu. It will ask you to create a username and password and that’s all there is to it.

WSL Conclusion

This tool is very effective for the Linux loving Windows users like me. I can test GitHub tools for my posts, test Python code without extra dependencies and its all done in a Hyper-V style environment. This guy takes home the cake with a 4 out of 5 bunnies

Want to learn more about ethical hacking?

We have a  networking hacking course that is of a similar level to OSCP, get an exclusive discount here

Help support LHN by buying a T-shirt or a mug?

Check out our selection here

Do you know of another GitHub related hacking tool?

Get in touch with us via the contact form if you would like us to look at any other GitHub ethical hacking tools

You may also like

1 comment

SSaku April 11, 2022 - 2:14 pm

Im using WSL to create SSH tunels, so I can get back from my linux machine into windows.
The less i have to look @Windows Desktop, the better.

Comments are closed.