How to install WSL (Windows 11)

How to install WSL (Windows 11)

Intro

Today one of my teachers from the AI Master's Degree, asked me to install Ubuntu 20.04 on my personal laptop, so that I could use ros (wiki.ros.org/noetic/Installation/Ubuntu).

But I didn't want to dualboot or to use a VM (Virtual Machine) that runs slowly, so I decided to go ahead and install WSL (Windows Subsystem for Linux). This will let me use ros, on my windows system, causing little to none disruption.

So I decided to point out some of WSL's features and advantages, as well as take the readers on the process of installing.

What is WSL

It's a tool that can run Linux environments directly on Windows, without the overhead of the other methods.

What can you do with WSL

  • Choose Linux distributions directly from the Microsoft Store
  • Run common command-line tools
  • Run Bash shell scripts and Linux command-line applications
  • Install software using Linux distribution package manager.
  • Invoke applications from both operative systems through.

How to install it

  1. Open an administrator PowerShell, and run the following command: wsl --install.

Screenshot 2022-05-16 204834.png

  1. Restart the machine.
  2. The end... Yup, that simple.

So what happened here? The command that I showed installed the wsl version 2, the most up to date at the moment, installed the last Linux kernel and, by default, installed the Ubuntu distribution.

After restarting the machine, you can go ahead and open you Windows Terminal. Open a new tab with the Ubuntu distro, the first time you do this, it will take a little bit longer, it's normal. Then, you will be prompted to create a user account and voilà, all set and done.