Windows Logo + WSL

How to Install WSL 2 on Windows 10

WSL is stand for Windows Subsystem for Linux. Generally, you can run Linux distro on while running windows. WSL is created for developer to run all GNU/Linux environment directly on Windows. Usually, people use software that support for Virtual Machine like VMware or VirtualBox or maybe using dual boot configuration.

Why I write this article? The other day I need to install docker on my computer. The docker version that I need to install is using WSL backend. So, of course I need to install the WSL. This time I need to install and learn docker to use it with Apache Spark but this is going to be another story for another time 😊. I already install WSL version 2 on my computer. Below, are some requirements that you need to follow if you want to work with WSL version 2.

You must be running windows 10 version 2004 and higher. Maybe you can consider to upgrade your windows version if don’t have those supported version. Just go to setting > update security > check for updates. So how to check your windows version? The simplest way hit Windows logo key + R, type winver and press enter.

Command Win + R
Command Win + R
Example Windows Version
Example Windows Version

The next step is to install the WSL version 2. I can guarantee for you, this step is very simple. Open Command Prompt or PowerShell and type “wsl –install” without quotes. Hit enter and wait for the process to complete after that you need to restart your computer. It’s also recommended to install “Terminal” is you using WSL from windows store. Go to Windows store and type “terminal”.

By the default is you using command “wsl –install” it will install Ubuntu distro. Can we use another Linux distro as well? Of course, you can install another popular distro as you desire. You need to use another command to install distro that available in WSL 2.

  • Type wsl -l -o to list all distro that available to install
  • Enter command wsl –install -d Debian if you to install Debian distro

It’s simple right? If you run to another problem during installation you can refer to official WSL documentation from Microsoft. Okay that’s it. See you on another story.


Comments

Leave a Reply

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