Windows Subsystem for Linux. Installation Linux Distributions.

By | June 17, 2024

Windows Subsystem for Linux (WSL) is new feature of Microsoft Windows 10 and 11. It look as light weight implementation of virtualization and alternative to Virtual box and/or HyperV. WSL is Windows feature with must be turned on. Go to Control Panel=>Programs and Features=>Turn Windows features on and off. Scroll down, find Windows Subsystem for Linux, check box near this line (on Windows 11 also check box for Virtual Machine Platform feature to enable WSL version 2) as well, click OK and reboot computer.
Check list of available WSL Linux distributions:

C:\>wsl --list --online
The following is a list of valid distributions that can be installed.
Install using 'wsl.exe --install '.

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
Ubuntu-24.04                           Ubuntu 24.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

Begin with installing Ubuntu-24.04:

C:\>wsl --install -d Ubuntu-24.04

Now installing in the same way second Linux distribution – OracleLinux_9_1.
Now WSL has 2 Linux distribution installed:


C:\>wsl --list
Windows Subsystem for Linux Distributions:
Ubuntu-24.04 (Default)
OracleLinux_9_1

Now let us start Oracle Linux, check operating system, IP address and exit:


C:\>wsl -d OracleLinux_9_1
[smk@MSI c]$ cat /etc/os-release
NAME=”Oracle Linux Server”
VERSION=”9.1″
ID=”ol”
ID_LIKE=”fedora”
VARIANT=”Server”
VARIANT_ID=”server”
VERSION_ID=”9.1″
PLATFORM_ID=”platform:el9″
PRETTY_NAME=”Oracle Linux Server 9.1″
ANSI_COLOR=”0;31″
CPE_NAME=”cpe:/o:oracle:linux:9:1:server”
HOME_URL=”https://linux.oracle.com/”
BUG_REPORT_URL=”https://github.com/oracle/oracle-linux”

ORACLE_BUGZILLA_PRODUCT=”Oracle Linux 9″
ORACLE_BUGZILLA_PRODUCT_VERSION=9.1
ORACLE_SUPPORT_PRODUCT=”Oracle Linux”
ORACLE_SUPPORT_PRODUCT_VERSION=9.1
[smk@MSI c]$ ip addr
1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
   link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
   inet 127.0.0.1/8 scope host lo
     valid_lft forever preferred_lft forever
   inet6 ::1/128 scope host
     valid_lft forever preferred_lft forever
2: eth0: mtu 1500 qdisc mq state UP group default qlen 1000
   link/ether 00:15:5d:4a:70:a9 brd ff:ff:ff:ff:ff:ff
   inet 172.21.68.174/20 brd 172.21.79.255 scope global eth0
     valid_lft forever preferred_lft forever
   inet6 fe80::215:5dff:fe4a:70a9/64 scope link
     valid_lft forever preferred_lft forever
[smk@MSI c]$ exit
logout

C:\>

Repeat the same for Ubuntu-24.04 distribution:


C:\>wsl -d Ubuntu-24.04
To run a command as administrator (user “root”), use “sudo “.
See “man sudo_root” for details.

smk@MSI:/mnt/c$ cat /etc/os-release
PRETTY_NAME=”Ubuntu 24.04 LTS”
NAME=”Ubuntu”
VERSION_ID=”24.04″
VERSION=”24.04 LTS (Noble Numbat)”
VERSION_CODENAME=noble
ID=ubuntu
ID_LIKE=debian
HOME_URL=”https://www.ubuntu.com/”
SUPPORT_URL=”https://help.ubuntu.com/”
BUG_REPORT_URL=”https://bugs.launchpad.net/ubuntu/”
PRIVACY_POLICY_URL=”https://www.ubuntu.com/legal/terms-and-policies/privacy-policy”
UBUNTU_CODENAME=noble
LOGO=ubuntu-logo
smk@MSI:/mnt/c$ ip addr
1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
   link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
   inet 127.0.0.1/8 scope host lo
     valid_lft forever preferred_lft forever
   inet6 ::1/128 scope host
     valid_lft forever preferred_lft forever
2: eth0: mtu 1500 qdisc mq state UP group default qlen 1000
   link/ether 00:15:5d:4a:74:6d brd ff:ff:ff:ff:ff:ff
   inet 172.21.68.174/20 brd 172.21.79.255 scope global eth0
     valid_lft forever preferred_lft forever
   inet6 fe80::215:5dff:fe4a:746d/64 scope link
     valid_lft forever preferred_lft forever
smk@MSI:/mnt/c$ exit
logout

C:\>

/etc/wsl.conf file is used to set distribution environments.

Leave a Reply

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