Install Rocky Linux 9 on VirtualBox on Windows


Rocky Linux 9 is an enterprise-class, community-supported, and open-source operating system designed to provide a stable and reliable platform for server deployments. In this comprehensive guide, we will walk you through the step-by-step process of installing Rocky Linux 9 on VirtualBox, a popular virtualization platform for Windows users. Whether you’re a Linux enthusiast, a system administrator, or someone looking to explore a new Linux distribution, this guide will help you set up Rocky Linux 9 on your Windows system.

1. What is Rocky Linux?

Rocky Linux is a free and open-source Linux distribution created as a downstream, binary-compatible alternative to Red Hat Enterprise Linux (RHEL). It aims to provide a stable and secure platform for organizations and individuals seeking a reliable Linux operating system for server deployments. With the discontinuation of CentOS Linux, Rocky Linux has gained popularity as a suitable replacement, offering long-term support and compatibility with RHEL packages.

2. Preparing Your Windows System

Before we begin the installation process, ensure that your Windows system meets the following prerequisites:

  • A Windows PC or laptop with sufficient resources (CPU, RAM, and storage) for virtualization.
  • An active internet connection for downloading software and updates.
  • Administrative privileges to install VirtualBox and create virtual machines.

3. Installing VirtualBox

VirtualBox is a free and open-source virtualization software that allows you to run multiple operating systems on a single physical machine. To install VirtualBox on your Windows system, follow these steps:

  1. Download the VirtualBox installer for Windows from the official website (
  2. Run the installer executable file and follow the on-screen instructions to install VirtualBox.
  3. Once VirtualBox is installed, launch the application.

4. Downloading Rocky Linux 9 ISO

To install Rocky Linux 9 on VirtualBox, you’ll need to download the Rocky Linux 9 ISO image. Follow these steps to download the ISO:

  1. Open your web browser and visit the Rocky Linux website (
  2. Navigate to the “Download” section and choose the appropriate architecture (e.g., x86_64) for your virtual machine.
  3. Click on the download link to save the Rocky Linux 9 ISO file to your Windows system.

5. Creating a New Virtual Machine in VirtualBox

Now that you have VirtualBox installed and the Rocky Linux 9 ISO downloaded, it’s time to create a new virtual machine (VM) to install Rocky Linux. Follow these steps:

  1. Open VirtualBox if it’s not already running.
  2. Click on the “New” button in the VirtualBox Manager window to create a new VM.
  3. In the “Name and operating system” window, enter a name for your VM (e.g., “Rocky Linux 9”).
  4. From the “Type” dropdown menu, select “Linux.”
  5. For the “Version,” choose “Red Hat (64-bit)” as Rocky Linux is RHEL-compatible.
  6. Click “Next” to proceed.
  7. In the “Memory size” window, allocate the amount of RAM you want to assign to the VM. It is recommended to allocate at least 2GB or more for a smooth experience. Click “Next” when ready.
  8. In the “Hard disk” window, select “Create a virtual hard disk now” and click “Create.”
  9. Choose the “VDI (VirtualBox Disk Image)” option as the hard disk file type and click “Next.”
  10. Opt for the “Dynamically allocated” option for storage on the physical hard drive, and click “Next.”
  11. Specify the size of the virtual hard disk. A minimum of 20GB is recommended for Rocky Linux 9, but you can allocate more if you have ample storage space. Click “Create” to finish creating the VM.

6. Installing Rocky Linux 9 on VirtualBox

With the VM created, it’s time to install Rocky Linux 9. Follow these steps:

  1. In the VirtualBox Manager, select the newly created VM (e.g., “Rocky Linux 9”).
  2. Click the “Settings” button or right-click the VM and choose “Settings.”
  3. In the VM’s settings, navigate to the “Storage” section.
  4. Under the “Controller: IDE” section, click on the empty CD/DVD drive and then click on the disk icon on the right.
  5. Select “Choose a disk file” and browse to the location where you downloaded the Rocky Linux 9 ISO. Choose the ISO file and click “Add.”
  6. Click “OK” to save the settings and exit the VM settings window.
  7. Start the VM by selecting it in the VirtualBox Manager and clicking the “Start” button.
  8. The VM will boot from the Rocky Linux 9 ISO. You will see the Rocky Linux boot menu. Press “Enter” to begin the installation process.
  9. Follow the on-screen prompts to configure the language, keyboard layout, and installation source. Choose “Install Rocky Linux 9” and press “Enter.”
  10. Proceed with the installation by configuring the installation destination, setting the hostname, and configuring the network. Follow the prompts to create a user account and set a password.
  11. After completing the installation steps, the system will begin installing Rocky Linux 9 on the virtual hard drive.
  12. Once the installation is complete, you will be prompted to reboot the VM. Press “Enter” to restart the VM.

7. Configuring Rocky Linux Post-Installation

After the VM reboots, you will need to perform some post-installation configuration steps:

  1. Log in to Rocky Linux 9 using the username and password you created during the installation.
  2. Update the system by opening a terminal and running the following commands:
sudo yum update
  1. Install VirtualBox Guest Additions for improved integration between the host and guest operating systems:
sudo yum install kernel-headers kernel-devel gcc dkms
  1. Insert the VirtualBox Guest Additions CD image by going to the VirtualBox menu and selecting “Devices” > “Insert Guest Additions CD Image.”
  2. Open a terminal and navigate to the CD drive directory. Typically, it’s mounted under ‘/run/media/’ with a folder name related to VirtualBox.
  3. Install Guest Additions by running the following command:
sudo sh
  1. Reboot the VM to apply the changes:
sudo reboot
  1. After rebooting, Rocky Linux 9 should be running on VirtualBox with improved features and integration.

8. Conclusion

Congratulations! You’ve successfully installed Rocky Linux 9 on VirtualBox on your Windows system. Rocky Linux provides a stable and reliable Linux distribution for various server and development purposes. By following this comprehensive guide, you’ve gained the skills to set up and configure Rocky Linux on a virtual machine, allowing you to explore

and utilize this powerful Linux distribution.

As you continue to explore Rocky Linux, consider installing additional software, configuring services, and customizing the system to meet your specific needs. Rocky Linux offers compatibility with Red Hat packages and a supportive community, making it a valuable choice for server deployments and Linux enthusiasts. Enjoy your Rocky Linux experience!

Leave a Comment