Installing Rocky Linux on Windows 10/WSL2
Install Rocky Linux 9.0 Minimal
You need to download the layer.tar.xz file, which contains the Rocky Linux root filesystem. When the file is downloaded, you need to extract it. This can be done with 7-Zip , just right click in the file and select Extract here.
Start a PowerShell terminal (admin is not needed!). Now we will create a directory where WSL can store it’s files:
PS> mkdir AppData\RockyLinux9Minimal
And now it’s time to import the file into WSL:
PS> wsl --import RockyLinux-9-Minimal C:\Users\jonas\AppData\RockyLinux9Minimal Downloads\layer.tar --version 2
If you are using WSL (not WSL2) you just remove the --version 2
part.
You start Rocky Linux with the following command:
PS> wsl -d RockyLinux-9-Minimal
Note that you must use
microdnf
to install packages with minimal.
Install Rocky Linux 8
This installation is basically the same as with Rocky Linux 9 Minimal above.
You need to download the rocky-8.5-docker-x86_64.tar.xz file, which contains the Rocky Linux root filesystem. When the file is downloaded, you need to extract it. This can be done with 7-Zip , just right click in the file and select Extract here.
Start a PowerShell terminal (admin is not needed!). Now we will create a directory where WSL can store it’s files:
PS> mkdir AppData\RockyLinux8
And now it’s time to import the file into WSL:
PS> wsl --import RockyLinux-8 C:\Users\jonas\AppData\RockyLinux8 Downloads\rocky-8.5-docker-x86_64.tar --version 2
If you are using WSL (not WSL2) you just remove the --version 2
part.
You start Rocky Linux with the following command:
PS> wsl -d RockyLinux-8
Rocky Linux 8 has
dnf
and is like a “full” installation of Rocky Linux.
Windows Terminal
Microsoft have released a terminal that is really nice, Windows Terminal. With Windows Terminal you can have multiple tabs with cmd, powershell and multiple of WSL Linux variants running at the same time. Well worth a try, if you haven’t tried it yet!
Download Windows Terminal from Microsoft Store.