In the fast-paced world of technology, virtual machines (VMs) have become an essential tool for developers, testers, and learners alike. Imagine wanting to test a new operating system like Ubuntu, one of the most popular Linux distributions, without risking changes to your primary device’s settings or losing your data. Here comes Oracle VirtualBox, a free and open-source virtualization software that allows you to create an isolated environment to run multiple operating systems on a single device without needing additional hardware. This lesson is tailored for beginners in Linux who want to explore Ubuntu as part of an introduction to a Linux administration course, where we will explain step by step how to set up a Virtual Machine for Ubuntu using VirtualBox.
Imagine virtual machines as a room in your house: you can experiment with new furniture or paint without affecting the rest of the house. This is exactly what VirtualBox does; it provides an isolated environment to safely try Ubuntu. Whether you’re a student learning the basics of Linux, a programmer wanting to test applications on a Linux environment, or even a curious person interested in exploring a new operating system, this guide will give you the tools needed to get started. We’ll cover every step, from installing VirtualBox to downloading the Ubuntu ISO file, setting up the virtual machine, and finally launching the system successfully. By the end of this lesson, you’ll be able to run Ubuntu inside VirtualBox confidently, with a deep understanding of the fundamental concepts of virtualization.
1. Understanding Virtual Machine Simulation and the Role of VirtualBox
Virtual machine simulation is a technology that allows you to run a virtual computer within a real one. Imagine you have a physical computer with a processor and memory, but instead of installing an operating system directly on this device, you create a virtual computer that mimics these resources. This virtual computer functions as an independent container capable of running an operating system different from the host. For example, if you’re using Windows, you can run Ubuntu inside VirtualBox without affecting your Windows system.
Oracle VirtualBox is a free and open-source virtualization tool developed by Oracle, supporting multiple host operating systems such as Windows, macOS, and Linux. What makes VirtualBox preferred for beginners is its user-friendly interface, support for a wide range of operating systems, and its free nature. Virtualization is particularly useful for beginners in Linux, as it allows them to experiment with distributions like Ubuntu without changing their device’s settings or worrying about data loss. For instance, a developer can test an application on Ubuntu without needing a separate machine, while a student can explore Linux commands in a safe environment.
Historically, virtualization has revolutionized the information technology world since its emergence in the 1960s with IBM systems, where it was used to run applications on large central computing devices. Today, it has become an essential tool for development, testing, and education. In this lesson, we’ll focus on using VirtualBox to create an Ubuntu environment, with practical steps tailored for beginners.
2. The Essential Requirements for Setting Up a Virtual Machine
Now, before starting to create a virtual machine for Ubuntu, it’s essential to ensure all the necessary requirements are met. These requirements include the hardware and software needed to guarantee smooth operation of the virtual system. First, you’ll need a computer with appropriate specifications. At a minimum, it’s recommended to have a dual-core processor, 8 gigabytes of RAM, and 25 gigabytes of free storage space. However, if your device has higher specifications (such as 16 gigabytes of RAM and a quad-core processor), performance will be better, especially when running heavy applications within Ubuntu.
Second, you’ll need to download the Oracle VirtualBox program from its official website (www.virtualbox.org). Make sure to choose the appropriate version for your host operating system (Windows, macOS, or Linux). VirtualBox is free and easy to install, and we’ll cover its installation steps later. Third, you’ll need an Ubuntu ISO file, which can be downloaded from the official site (www.ubuntu.com). Choose the stable release (such as Ubuntu 24.04 LTS) to ensure compatibility and stability.
Practically, think of these requirements as preparing for a trip: you need a bag (VirtualBox), a destination (Ubuntu ISO), and a car strong enough to get there (your device’s specifications). If you’re a beginner, these requirements might look intimidating, but they are simple once understood. For example, if you’re using an old device with limited memory, you can allocate only 2 gigabytes to the virtual machine, but performance might be slow. For this reason, it’s always recommended to check your device’s specifications before beginning.
3. Steps to Install Oracle VirtualBox
Now it’s time to begin the practical steps for setting up VirtualBox. These steps are designed to be clear and suitable for beginners. If you imagine VirtualBox as a key that opens the door to exploring new operating systems, its installation is the first step to open this door.
Step 1: Download VirtualBox
Go to the official VirtualBox website (www.virtualbox.org) and select the version appropriate for your operating system. For example, if you’re using Windows 10, select the Windows version. The file is usually about 100 megabytes in size, so make sure you have a stable internet connection.
Step 2: Install the Software
Once you’ve downloaded the file, click on it to start the installation process. A window will appear that asks you to click on “Next” with the default settings. Ensure you install all components, including the VirtualBox Extension Pack (if you need USB support or advanced features). The process takes only a few minutes.
Step 3: Verify the Installation
After the installation is complete, locate the VirtualBox icon on your desktop or in the Start menu. Click on it to open the program. If the main interface appears, this means the installation was successful. The interface is simple and contains buttons like “New” and “Settings”.
If you encounter any issues during installation, such as an error about enabling virtualization technology in BIOS, you’ll need to access your device’s BIOS settings and enable the “Virtualization Technology” option (VT-x or AMD-V). This is a technical step, but it’s necessary for efficient virtual system operation.
4. Downloading and Setting Up the Ubuntu ISO File
Now that VirtualBox is installed, it’s time to download and configure the Ubuntu ISO file for your virtual machine. The ISO file is a digital image of the operating system, similar to a bootable DVD. Imagine buying a DVD containing Ubuntu, but instead, you carry it as a digital file.
Step 1: Visit the Official Ubuntu Website
Go to www.ubuntu.com/download and select the stable Ubuntu release (such as 24.04 LTS). LTS stands for “Long Term Support,” meaning this release is supported for five years and is ideal for beginners. Click the download button, and the ISO file (around 3-4 gigabytes) will start downloading.
Step 2: Verify the File’s Integrity
To ensure the file you downloaded isn’t corrupted, check the SHA256 value on the Ubuntu website and compare it with the value of the downloaded file using a tool like sha256sum on Linux or a similar tool on Windows. This step guarantees that the system you’ll install is safe and error-free.
Step 3: Save the File in an Accessible Location
After downloading, save the ISO file in a folder that’s easy to access, such as your desktop or a “Downloads” folder. You’ll need to specify the path to this file later when setting up the virtual machine.
5. Creating a Virtual Machine in VirtualBox
Now it’s time to create the virtual machine that will host Ubuntu. This process is similar to setting up a new computer, but within a virtual environment.
Step 1: Open VirtualBox and Create a New Machine
Open VirtualBox and click on the “New” button in the main interface. A window will appear asking you to enter the virtual machine’s name. Write a name like “Ubuntu 24.04” to indicate the system. In the “Type” field, select “Linux,” and in the “Version” field, choose “Ubuntu (64-bit).” Click “Next”.
Step 2: Customize the RAM
A window will appear to specify the RAM size. It’s recommended to allocate 2-4 gigabytes for Ubuntu to ensure good performance, but make sure to leave enough RAM for your host system. For example, if you have 8 gigabytes of RAM, allocate 2 gigabytes to the virtual machine. Drag the slider to set the size, then click “Next”.
Step 3: Create a Virtual Hard Disk
Select “Create a virtual hard disk now” and click “Create.” Choose the “VDI” (VirtualBox Disk Image) format for optimal compatibility. In the next step, select “Dynamically Allocated” to allow the disk to grow as needed, then set the disk size (20-25 gigabytes recommended for Ubuntu). Finally, choose the save location for the disk and click “Create”.
Step 4: Configure the ISO File
Return to the main VirtualBox interface, select the new virtual machine, and click “Settings.” Navigate to the “Storage” section, underneath “Controller: IDE,” click the empty disk icon. Click “Choose a disk file” and select the Ubuntu ISO file you downloaded. Click “OK” to save the settings.
6. Installing and Booting Ubuntu on the Virtual Machine
Now that the virtual machine is set up, it’s time to install and boot Ubuntu on it.
Step 1: Boot the Virtual Machine
Select the virtual machine in VirtualBox and click “Start.” The Ubuntu boot screen will appear. Choose “Install Ubuntu” or “Try Ubuntu” (if you want to test it before installing). If you select installation, the installer window will show.
Step 2: Follow the Installer Prompts
Follow the on-screen instructions:
- Select your language (e.g., Arabic or English).
- Choose the keyboard layout.
- Select “Normal Installation” for a full Ubuntu experience.
- In the partition options, choose “Erase disk and install Ubuntu” (this will apply only to the virtual disk, not your actual device).
- Set your username and password.
Step 3: Complete the Installation
After selecting your settings, click “Install Now.” The process will take about 10-20 minutes depending on your device’s specifications. After the installation completes, reboot the virtual machine as prompted.
Step 4: Log in to Ubuntu
After rebooting, the login screen will appear. Enter the username and password you selected. The Ubuntu graphical interface will now be visible, and you can begin exploring the system.
7. Optimizing the Virtual Machine Configuration
To achieve an ideal experience, you can optimize the virtual machine settings. For example, you can increase the number of CPU cores in the “System” section of VirtualBox settings. It’s also recommended to install “Guest Additions,” which is a set of additional tools that enhance performance (such as full-screen support and file sharing). To install them:
In the Ubuntu virtual window, click “Devices” -> “Insert Guest Additions CD Image”
sudo apt update
sudo apt install build-essential dkms
sudo mount /dev/cdrom /mnt
sudo sh /mnt/VBox_GAs_*.sh
After rebooting, you’ll notice improvements in performance and user experience.
We recommend continuing your learning by experimenting with basic Linux commands (such as ls, cd, and apt) or exploring other Linux distributions like Kali Linux or Fedora using the same steps. You can also visit the official Ubuntu website or VirtualBox forums for more resources. If you feel confident, try creating another virtual machine to test different applications or configurations. Virtualization is your gateway to the vast world of Linux, so make the most of it!
References
- Official Oracle VirtualBox Website: www.virtualbox.org
- Official Ubuntu Website: www.ubuntu.com
- Ubuntu Installation Guide for VirtualBox: help.ubuntu.com/community/VirtualBox
- Linux Community Forums for Beginners: ubuntuforums.org
- YouTube tutorial: “How to Create a Virtual Environment Using Oracle VM VirtualBox: Explanation and Tips 2021”



