How to Install Ubuntu in Virtual Box

Installing Ubuntu on VirtualBox is a great way to explore Linux without affecting your main system. I’ll walk you through each step so you can dive into Ubuntu safely within a virtual environment.

Trust me, once you get the hang of VirtualBox, it’s almost like having a whole other computer at your disposal!

Let’s jump in.

How to Install Ubuntu in Virtual Box

Step 1: Setting Up VirtualBox and Downloading Ubuntu

  1. Download VirtualBox: First things first, if you don’t already have VirtualBox, you’ll want to download it. Head over to virtualbox.org and grab the latest version for your operating system (Windows, macOS, or Linux).
  2. Download Ubuntu ISO: Now, let’s get Ubuntu. Go to ubuntu.com/download and choose the version you want. If you’re new to Linux, I recommend the latest LTS (Long Term Support) version, as it’s stable and well-supported. Click the link to download the ISO file.Personal Note: I remember my first time downloading an Ubuntu ISO—I had no idea what an ISO was! It turns out it’s just a “disk image” file that lets you install Ubuntu, just as you would if you had it on a DVD or USB drive.

Step 2: Creating a New Virtual Machine in VirtualBox

  1. Open VirtualBox: Once VirtualBox is installed, open it up. You’ll see a pretty minimal interface at first, but it’s surprisingly powerful.
  2. Create a New Virtual Machine: Click the “New” button at the top. A setup wizard will appear. Here’s what you’ll do:
    • Name: Name your VM something easy to recognize like “Ubuntu 22.04” (or whatever version you’re installing).
    • Type: Choose “Linux.”
    • Version: Select “Ubuntu (64-bit)” from the dropdown menu.
  3. Allocate Memory (RAM): For Ubuntu, I’d recommend at least 2 GB (2048 MB), but if you have extra RAM on your host machine, go for 4 GB to make things smoother.Personal Tip: I once tried allocating too much memory to a VM, thinking more is always better. Spoiler: it left my main system struggling, so find a good balance here.
  4. Create a Virtual Hard Disk: Choose “Create a virtual hard disk now” and follow the prompts. I’d recommend at least 25 GB for Ubuntu, but you can always go higher if you have space.

Step 3: Setting Up Ubuntu Installation

  1. Attach the ISO File: In VirtualBox, you’ll need to tell it where to find the Ubuntu ISO you downloaded. Here’s how:
    • Select your newly created VM in the list and click “Settings.”
    • Go to the “Storage” tab.
    • Under “Controller: IDE,” click “Empty,” then click the small CD icon and select “Choose a disk file.”
    • Browse to where you downloaded the Ubuntu ISO and select it.
    Pro Tip: Double-check you’ve selected the right ISO! I accidentally loaded the wrong file once and couldn’t figure out why my “Ubuntu” VM was showing a Windows setup screen.
  2. Save and Start the VM: Click “OK” to save your settings, then select your VM and hit “Start.” This should launch Ubuntu’s installation process inside VirtualBox.

Step 4: Installing Ubuntu

  1. Select Language and Keyboard Layout: Once Ubuntu boots up, you’ll be greeted with an installer screen. Choose your preferred language and keyboard layout.
  2. Choose Installation Type: You’ll get options like “Normal installation” or “Minimal installation.” The “Normal” installation includes additional software like LibreOffice and media players, while the “Minimal” is lighter. I’d go with “Normal” if you have space.
  3. Installation Type: Select “Erase disk and install Ubuntu.” Don’t worry; this only affects the virtual disk you created earlier, not your actual system.My First Time: I remember feeling a moment of panic here, thinking it would erase my main system! But VirtualBox keeps everything isolated, so your main setup is safe and sound.
  4. Follow the Prompts: Ubuntu will guide you through setting up your time zone, user information, and password. Once you’ve filled everything out, click “Install Now” and let it do its thing!

Step 5: Finalizing Installation and Rebooting

  1. Wait for Installation to Complete: The installation will take a few minutes, so feel free to grab a coffee while it does its thing.Pro Tip: Don’t close VirtualBox or your computer during this process! You’d have to start over, and I’ve learned this the hard way after my laptop shut down mid-install.
  2. Restart the VM: Once installation is complete, Ubuntu will prompt you to restart. Just hit “Restart Now.”
  3. Eject the ISO: After the restart, VirtualBox may ask you to “remove the installation medium.” This just means we need to unmount the ISO file. In VirtualBox, go to Devices > Optical Drives and uncheck the ISO. Then press Enter in the Ubuntu VM to continue.

Step 6: Exploring Ubuntu in Your VM

  1. Log In and Customize: After rebooting, you’ll see the Ubuntu login screen. Enter your password, and welcome to Ubuntu! Feel free to explore, change settings, and start installing software.My Favorite First Step: I like to customize the appearance right away and change the theme to dark mode (in Settings > Appearance). It makes things feel more polished, and, hey, it’s easier on the eyes.
  2. Install Guest Additions (Optional but Recommended): This is an extra step to improve the VM’s performance and resolution:
    • In VirtualBox, go to Devices > Insert Guest Additions CD image.
    • Follow the prompts inside Ubuntu to install it.
    Why This Matters: Guest Additions make your VM experience smoother, letting you adjust screen resolution, share files, and even use your mouse seamlessly between the VM and your main OS.

Wrapping It Up

And there you have it! You’re now running Ubuntu in VirtualBox, a safe and fun way to try Linux without committing to a full installation on your computer. I remember feeling like I’d just unlocked a new world when I first started up Ubuntu in a virtual environment—it felt so powerful to have two operating systems running side-by-side. Now, you can practice Linux, experiment, or just get familiar with Ubuntu without worry.

Enjoy your new virtual Ubuntu setup, and happy exploring!


Discover more from Prime Inspire

Subscribe to get the latest posts sent to your email.

Leave a Reply

Scroll to Top

Discover more from Prime Inspire

Subscribe now to keep reading and get access to the full archive.

Continue reading