If you’re looking to try out Rocky Linux—an enterprise-grade, open-source alternative to CentOS—VirtualBox is a great way to get started without touching your main system. This guide walks you through installing the latest version of Rocky Linux on VirtualBox from scratch.
What You’ll Need
- VirtualBox installed on your system (Windows, macOS, or Linux)
- Rocky Linux ISO – Download the latest version from the official site
- At least 2 GB of RAM, 20 GB of disk space, and a stable internet connection
Step 1: Download Rocky Linux ISO
Go to rockylinux.org/download and choose the appropriate ISO. For most users, the DVD ISO is the best option as it includes the full installer and common packages.
Step 2: Create a New Virtual Machine in VirtualBox
- Open VirtualBox and click
New
. - Name the VM something like “Rocky Linux”.
- Set Type to
Linux
and Version toRed Hat (64-bit)
. - Click
Next
.
Step 3: Assign Memory
- Allocate at least 2048 MB (2 GB) of RAM. If you have more to spare, go for 4096 MB (4 GB) for smoother performance.
Step 4: Create a Virtual Hard Disk
- Choose
Create a virtual hard disk now
and clickCreate
. - Use the default VDI format and choose
Dynamically allocated
. - Set the disk size to at least 20 GB, then click
Create
.
Step 5: Mount the Rocky Linux ISO
- Go to your VM’s settings >
Storage
. - Under the
Controller: IDE
, click the empty CD icon. - On the right side, click the disk icon and choose
Choose a disk file…
- Select the downloaded Rocky Linux ISO.
Step 6: Boot and Begin Installation
- Start the VM.
- When prompted, choose Install Rocky Linux.
- Select your language and region.
Step 7: Installation Setup
- Installation Destination: Select the virtual hard drive (should be preselected).
- Network & Hostname: Turn the network on if needed and set a hostname if you want.
- Software Selection: Choose either a Minimal Install or Server with GUI based on your needs.
Once you’re ready, click Begin Installation
.
Step 8: Set Root Password and Create User
During the installation:
- Set a secure root password.
- Create a regular user with admin (sudo) privileges.
Wait for the install to complete. Then reboot when prompted.
Step 9: First Boot & Post-Install Setup
After reboot:
- Log in with your user account.
- Update the system:
sudo dnf update -y
Optional:
- Install Guest Additions for better display and integration (Settings > Devices > Insert Guest Additions CD, then run the installer inside Rocky Linux).
Final Thoughts
You’re now running Rocky Linux in a virtual environment. This setup is perfect for testing, development, or getting comfortable with the OS before deploying it to real hardware or cloud servers.
Have questions or hit a snag? Drop a comment below—I’ll help out.
Leave a Reply