Tuesday, December 10, 2024How to install Linux on Windows with WSL
Keven Client A. Cataluña @LinkedIn
Introduction

This guide explains how to install Linux on a Windows machine using Windows Subsystem for Linux (WSL). It covers enabling required Windows features, choosing a Linux distribution, resolving common setup issues, and updating the Linux system after installation.

Steps1. Enable this following windows features
  • Virtual Machine Platform
  • Windows Subsystem for Linux
2. Restart your computer to apply the changes3. List the available Linux distributions
    wsl --list --online
  
      The following is a list of valid distributions that can be installed.
  Install using 'wsl --install -d <Distro>'.

  NAME                                   FRIENDLY NAME
  Ubuntu                                 Ubuntu
  Debian                                 Debian GNU/Linux
  kali-linux                             Kali Linux Rolling
  Ubuntu-18.04                           Ubuntu 18.04 LTS
  Ubuntu-20.04                           Ubuntu 20.04 LTS
  Ubuntu-22.04                           Ubuntu 22.04 LTS
  OracleLinux_7_9                        Oracle Linux 7.9
  OracleLinux_8_7                        Oracle Linux 8.7
  OracleLinux_9_1                        Oracle Linux 9.1
  openSUSE-Leap-15.5                     openSUSE Leap 15.5
  SUSE-Linux-Enterprise-Server-15-SP4    SUSE Linux Enterprise Server 15 SP4
  SUSE-Linux-Enterprise-15-SP5           SUSE Linux Enterprise 15 SP5
  openSUSE-Tumbleweed                    openSUSE Tumbleweed
  
4. Download and install the Linux kernel update package (If you encounter error 0x800701bc) Error
    WslRegisterDistribution failed with error: 0x800701bc
Error: 0x800701bc WSL 2 requires an update to its kernel component.

For information please visit https://aka.ms/wsl2kernel
  
5. Install the Ubuntu 20.04 distribution
    wsl --install --distribution Ubuntu-20.04
  
      Installing: Ubuntu 20.04 LTS
  Ubuntu 20.04 LTS has been installed.
  Launching Ubuntu 20.04 LTS...
  
6. Create a default UNIX user account7. Update and upgrade the packages
    sudo apt update && sudo apt upgrade
  
Tags
← Back to the posts