wsl2

Installing WSL2 on Windows 10

Spread the love
wsl2
Installing WSL2 on Windows 10 1

This week I got around to installing Windows Subsystem for Linux version 2 my laptop so that I am now able to run Ubuntu inside of Windows which means that I no longer need putty to ssh to servers any more.

The install is pretty straight forwards and I used the official Windows guide to install it.

https://insider.windows.com/getting-startedThe first step was to make sure that I had a new enough version of Windows 10 to install WSL2 on it (Build 20262 or higher) which it was as I have been a member of the Windows Insider program for a while.

The process of installing WSL2 was as follows:

1 – Enable the Windows Subsystem for Linux

To enable WSL run the following in an Administrative powershell:

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
Installing WSL2 on Windows 10

2 – Enable Virtual Machine feature

The Virtual Machine Platform will need to be installed before WSL2 can be so run the following in the Admin Powershell used above:

dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Installing WSL2 on Windows 10

3 – Install WSL

Before you can install WSL2 you need to have WSL installed so install it by running the following command in powershell:

wsl --install
Installing WSL2 on Windows 10

My laptop needed rebooting before I could continue. If you get the same message as above reboot your machine before continuing with the installation.

Once the machine reboots you will see the following:

Installing WSL2 on Windows 10

Wait for the installation to ask for a user name and add one and press enter:

Installing WSL2 on Windows 10

Type a new password when prompted and press enter:

Installing WSL2 on Windows 10

WSL will now boot into Ubuntu:

Installing WSL2 on Windows 10

Close the window by pressing the x in the top right hand corner.

4 – Download the Linux kernel update package

Now WSL is enabled it is time to download and install WSL2 by running the following command in an Administrative Powershell:

dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Installing WSL2 on Windows 10

Download WSL2 Linux Kernel update package for x64 machines.

Run the installer that was downloaded by double clicking on it. When it asks to run with elevated permissions click yes and then the installation will finish:

Installing WSL2 on Windows 10
Installing WSL2 on Windows 10 2

Click Finish to close the window.

Download the WDL2 Kernel update and run the installer clicking Yes when prompted for elevated permissions:

5 – Setting WSL2 as the default

To set WSL2 as the default run the following command in the Administrative Powershell:

Installing WSL2 on Windows 10

WSL2 should now be installed.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top