Using Windows Subsytem for Linux 2

So I wanted to start playing around with the Windows Subsystem for Linux 2. In the process there are just a couple things you have to do to get going and I thought I would cover them here for easy reference.

First off, you have to be using one of the insider builds to get access. It's not in the current Windows 10 release yet.

I am also assuming you currently have WSL installed. I am typing all the commands in Powershell.

Next you have to enable the Windows Virtual Machine Platform

Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform

You can see a list of distros you have installed already by typing the following command.

wsl --list

You should see somthing like this ..

PS C:\Users\timap> wsl --list
Windows Subsystem for Linux Distributions:
Ubuntu-18.04 (Default)
kali-linux
openSUSE-Leap-15-1

So, first we need to convert our existing installs to WLS 2, this we do with the following. I will use my Kali install as the example.

wsl --set-version kali-linux 2

Do this for each distro installed.

Next, to avoid doing this every time we can set WSL 2 as our defualt using the command. This will make sure every distro install hereafter uses WSL 2 by default.

wsl --set-default-version 2

Finally if you want to verify yout all set up you can run the following.

wsl --list --verbose

This will get you somthing similiar to this showing distros and the wsl version.

PS C:\Users\timap> wsl --list --verbose
  NAME                  STATE           VERSION
* Ubuntu-18.04          Stopped         2
  kali-linux            Running         2
  openSUSE-Leap-15-1    Stopped         2

I hope you find this useful.
Cheers


You'll only receive email when they publish something new.

More from sudo rm - rf
All posts