Installing Rocky Linux on Windows Subsystem for Linux WSL Red Hat RHEL RedHat

Using the command line to install Rocky Linux on Windows 10/WSL2 is straightforward, but there are some details to be aware of before you begin. In this article, we will discuss the procedures necessary to install Rocky Linux on a Windows machine using Windows Subsystem for Linux (WSL) version 2. 

In order to use WSL2, you should have the Windows 10 May 2020 Update (or a later version) installed. You can check your Windows version by going to the Start menu, typing “winver,” and pressing Enter. If you don’t have the correct version, you can download the latest update from the Microsoft Update website. 

Once Windows is updated the first step is to enable WSL. Open PowerShell as an administrator and run the following command: 

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart 

This command enables the Windows Subsystem for Linux. Once the command completes reboot your machine for the changes to take effect. 

The next step is to install the Linux kernel update package. This package is required for WSL2, and it can be downloaded from the Microsoft Store. Once the package is downloaded, double-click on it to begin the installation process. Accept the license terms and then follow the prompts to complete the installation. 

With the WSL and the Linux kernel update package installed, you are now ready to install Rocky Linux. The first step is to download the Rocky Linux appx package from the Microsoft store. Once you have the package downloaded, double-click on it to begin the installation process. You’ll need to accept the license terms and then follow the prompts to complete the installation. 

With Rocky Linux installed, you can open a command prompt or PowerShell and type “rocky” to launch the Rocky Linux shell. You will also need to configure the default user account for the WSL and setup passwords for the account in order to be able to use the shell 

You should now have a working installation of Rocky Linux on Windows 10/WSL2 using the command line. To start using it, simply open a command prompt or PowerShell and type “rocky” to launch the Rocky Linux shell. Keep in mind that you’ll need to configure the default user account for the WSL and set up a password for the account in order to be able to use the shell. 

In summary, to install Rocky Linux on Windows 10/WSL2 via command line: 

  1. Ensure that you have Windows 10 May 2020 Update (or later) installed on your machine 
  1. Enable WSL on your machine by running the command in PowerShell with admin privilege 
  1. Install the Linux kernel update package from Microsoft Store 
  1. Install the Rocky Linux appx package from Microsoft Store 
  1. Open command prompt or PowerShell and type “rocky” to launch the Rocky Linux shell. 
  1. Configure the default user account for the WSL and setup passwords for the account in order to be able to use the shell 

By following these steps, you’ll be able to run Rocky Linux on Windows 10/WSL2 using the command line, and you can start using all the powerful command-line tools and utilities that Rocky Linux has to offer. 

Leave a comment