Since the end of January, Oracle Linux 7.9 is officially available as Linux Distribution for the Windows Subsystem for Linux (WSL). This blog post will demonstrate how to install and use it.
Windows Subsystem for Linux (WSL)
WSL is available on Windows 10 and 11. If you try to run a Linux distribution without activating WSL, it will fail with the following message.
PS C:\WINDOWS\system32> oraclelinux79 Installing, this may take a few minutes... WslRegisterDistribution failed with error: 0x8007019e The Windows Subsystem for Linux optional component is not enabled. Please enable it and try again. See https://aka.ms/wslinstall for details. Press any key to continue...
To install WSL, open PowerShell with administrative privileges and run the following command.
PS C:\WINDOWS\system32> wsl --install Installing: Virtual Machine Platform Virtual Machine Platform has been installed. Installing: Windows Subsystem for Linux Windows Subsystem for Linux has been installed. Downloading: WSL Kernel Installing: WSL Kernel WSL Kernel has been installed. Downloading: Ubuntu The requested operation is successful. Changes will not be effective until the system is rebooted.
As the final step reboot your machine.
Currently, Oracle Linux is not listed in the list of valid distributions.
PS C:\WINDOWS\system32> 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 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
So it is not possible to install it directly with PowerShell – I think this will be added in the near future.
To install Oracle Linux, open the Microsoft Store and search for “Oracle Linux”.
Click on “Oracle Linux 7.9” and press “Get” on the next screen.
After a few minutes, Oracle Linux is installed.
Now open a CMD or a PowerShell – no administrative privileges are required here – and start the Linux subsystem. During the first start of the distribution, a user is created.
PS C:\WINDOWS\system32> oraclelinux79 Installing, this may take a few minutes... Please create a default UNIX user account. The username does not need to match your Windows username. For more information visit: https://aka.ms/wslusers Enter new UNIX username: oracle Changing password for user oracle. New password: BAD PASSWORD: The password is shorter than 8 characters Retype new password: passwd: all authentication tokens updated successfully. Installation successful!
Now you have a running Oracle Linux 7.9 on your machine.
[oracle@LT-R90R532C ~]$ cat /etc/os-release NAME="Oracle Linux Server" VERSION="7.9" ID="ol" ID_LIKE="fedora" VARIANT="Server" VARIANT_ID="server" VERSION_ID="7.9" PRETTY_NAME="Oracle Linux Server 7.9" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:oracle:linux:7:9:server" HOME_URL="https://linux.oracle.com/" BUG_REPORT_URL="https://bugzilla.oracle.com/" ORACLE_BUGZILLA_PRODUCT="Oracle Linux 7" ORACLE_BUGZILLA_PRODUCT_VERSION=7.9 ORACLE_SUPPORT_PRODUCT="Oracle Linux" ORACLE_SUPPORT_PRODUCT_VERSION=7.9