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″ 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 C:\> |
/etc/wsl.conf file is used to set distribution environments.