How to Install Ubuntu on VirtualBox – Step-by-Step Guide


Why VirtualBox Makes Sense for Trying Ubuntu

Before you jump into a full-fledged installation of Ubuntu 22.04 on your physical hardware, it’s a smart move to test it out in a safe and controlled environment. That’s where VirtualBox comes in. This step-by-step guide will walk you through setting up Ubuntu 22.04 on VirtualBox, allowing you to explore the OS without any risk to your primary system. Let’s get started!

Step 1: Getting Started – Downloads

Start by downloading and installing Oracle VirtualBox from the official website ( Choose the version appropriate for your host operating system (Windows, macOS, or Linux).

Next, download the Ubuntu 22.04 ISO image from the official Ubuntu website ( This is the installation file for Ubuntu that you’ll use in VirtualBox.

Step 2: Creating a New Virtual Machine

  1. Open VirtualBox and click the “New” button to create a new virtual machine.
  2. Give your VM a name
  1. Allocate memory to the VM. A minimum of 2GB is recommended for Ubuntu.
  1. Choose “Create a virtual hard disk now” and select the hard disk file type (VDI is fine).
  1. Choose between dynamically allocated or fixed size storage. Dynamically allocated is more flexible.
  2. Set the size of the virtual hard disk. At least 20GB is recommended for Ubuntu.

Step 3: Adjusting VM Settings

In VirtualBox, select your newly created VM and click “Settings.”

Under “System,” increase the allocated base memory if your host system can spare it.

Under “Display,” increase the video memory for better performance.

Click “Storage” and select the empty optical drive. On the right, click the CD icon and choose the Ubuntu 22.04 ISO you downloaded.

Step 4: Installing Ubuntu 22.04

  1. Start the VM. It will boot from the Ubuntu ISO.
  2. Select “Install Ubuntu” from the boot menu.
  3. Choose your language and click “Continue.”
  4. If you’re connected to the internet, you can choose to install updates and third-party software during installation.
  5. Select “Erase disk and install Ubuntu” as this simplifies the installation process for beginners.

Step 5: Configuring Ubuntu

  1. Choose your location and click “Continue.”
  2. Set your keyboard layout and click “Continue.”
  3. Create a user by providing your name, a username, and a password.
  4. Ubuntu will install, and the VM will restart.

Step 6: Exploring Ubuntu

Once the VM restarts, you’ll be greeted with the Ubuntu login screen. Enter the username and password you set earlier. Congratulations, you’ve successfully installed Ubuntu 22.04 on VirtualBox!


By installing Ubuntu 22.04 on VirtualBox, you’ve created a safe environment to experiment with the operating system without affecting your physical hardware. This is an excellent way to learn about Ubuntu’s features, applications, and interface before committing to a full installation.

Feel free to spend time exploring Ubuntu, installing software, and getting comfortable with its functionalities. If you decide you like it, you can then confidently proceed to install it on your physical hardware.

Previous Post

Beginner’s Guide: Getting Acquainted with Linux – A Step-by-Step Journey