Skip to main content

Install WSL

Learn how to install WSL (Windows Subsystem for Linux) using the terminal

The Windows Subsystem for Linux lets developers run a GNU/Linux environment directly on Windows. The latest version is WSL 2, which powers the Windows Subsystem for Linux to run ELF64 Linux binaries on Windows.

WSL How to install - Tutorial provided by AppSeed.

✅ List available WSL distros

$ wsl -l -o

NAME FRIENDLY NAME
Ubuntu Ubuntu
Debian Debian GNU/Linux
kali-linux Kali Linux Rolling
openSUSE-42 openSUSE Leap 42
SLES-12 SUSE Linux Enterprise Server v12
Ubuntu-16.04 Ubuntu 16.04 LTS
Ubuntu-18.04 Ubuntu 18.04 LTS
Ubuntu-20.04 Ubuntu 20.04 LTS

✅ Install WSL via powershell

Below command installs Ubuntu distribution.

$ wsl --install Ubuntu

✅ Check Current WSL Version

$ wsl -l -v

✅ Update from WSL 1 to WSL 2

$ wsl --set-version Ubuntu 2

✅ In Summary

WSL stands for "Windows Subsystem for Linux." It is a compatibility layer provided by Microsoft that allows you to run a Linux distribution natively on a Windows operating system. WSL essentially enables you to use Linux command-line tools, utilities, and even run Linux applications alongside your Windows applications without the need for a separate virtual machine or dual-boot setup.

This is particularly useful for developers and system administrators who work in heterogeneous environments or need access to Linux tools on a Windows machine.

Currently, are two major versions of WSL:

WSL 1

The first version of WSL is built on a translation layer that converts Linux system calls into Windows system calls. While it provides some compatibility with Linux applications, it may not offer full system call compatibility, and performance can be somewhat limited.

WSL 2

The second version of WSL uses a virtualization technology called Hyper-V to provide a more complete and efficient Linux kernel experience. WSL 2 offers better performance and improved compatibility with Linux applications. It allows for running a full-fledged Linux distribution with its own kernel alongside Windows.

Key features and use cases of WSL include:

  • Running Linux terminal and command-line tools within a Windows terminal.
  • Accessing and managing files in a Linux filesystem from Windows.
  • Running Linux server applications and development tools (e.g., web servers, databases, Docker) directly on Windows.
  • Developing cross-platform applications that need to be tested on both Windows and Linux.
  • Leveraging Linux package managers (e.g., apt, yum) to install and manage software packages on Windows.
  • WSL allows developers to use familiar Linux tools and workflows, making it easier to work with Linux-based technologies while using a Windows development environment.

✅ Resources