Suppose you want to play around with Linux and maybe you’ve heard people talking about Ubuntu. But you don’t have an extra computer laying around to try it, and you certainly don’t want to replace your main computer with this experimental idea. What should you do?
Enter “virtualization”. In modern day, pretty much any computer can host a hypervisor. That is, a piece of software that can host a virtual computer, inside of your actual computer. Meaning, you could create a “virtual machine” on your main computer, and try out Ubuntu on that virtual machine, or VM. When you are done, you can delete it, install other operating systems, etc.
There’s really two things you need here, a hypervisor of some sort, and some installation media for the operating system that you want to install.
On macOS, you have a couple of choices, but for a few reasons, we’ll cover how to set up VirtualBox.
First, navigate to:
From here, there are two things to download:
- Platform Package - click on “Windows hosts” to download an
.exefile. This is the main hypervisor software and user interface.
- Extension Pack - click on “All supported platforms” to download a
.vbox-extpackfile. This has some extended functionality that is useful.
They upgrade VirtualBox all of the time, but here is a snapshot of what this looks like on the day of this writing, and what to click on:
Next, in your Downloads folder you should see the two downloaded files:
.exe file to launch the installer:
Take all of the defaults, until complete:
Click “Finish” to land on the main window:
From the main VirtualBox window, click on the File, and the Preferences menu:
Next, click on Extensions. Then, click the “Add” button:
.vbox-extpack file downloaded in the previous step. Follow the prompts:
When complete, you should see the Extension Pack installed like this:
VirtualBox gives you a way to host virtual machines. This is like having extra computer hardware laying around: it can’t do much without an operating system. The scope of this post is to show how to install Ubuntu. For first, we need to download the installation media. Navigate to:
and download the latest “LTS” (Long Term Support) version that is there. That is version 22.04, as of this writing.
First, a quick checklist. You should have:
- Downloaded and installed VirtualBox
- Downloaded and installed the VirtualBox Extensions
- Downloaded the latest Ubuntu Desktop image (e.g.
If so, then we are ready to go. Start by launching VirtualBox. Next, click “New”:
Ideally, set the “Name” to be the same as you intend the computer name to be:
If possible, I like to give (window-based) Linux distributions 2GB of RAM or more :
A “Fixed size” disk allocates the entire disk on your hard drive, right now. If you configured a 200GB disk for your virtual machine, a Fixed disk will allocate 200GB on your computer right now. However, if you are short on disk space, but want to give the VM the impression that it has more, you can set this to “Dynamically allocated”. This means that VirtualBox will only use as much physical disk space as the virtual machine is taking up.
If you’ve allocated more than you have, then this is going to a problem one day. However, just having the ability to do this can fix some short-term, tedious problems.
The operating system and software typically takes 5-20GB depending on what you have installed, however if you have the extra disk space, ideally give it a bit more breathing room.
When done, you should see your new VM configured, but not powered-on yet.
WAIT! This isn’t super important, but can make a big different during the installation of the OS. I like to do two things before starting the VM for the first time: 1) add more CPU cores and 2) add more video memory.
By default, your new VM will just get 1 CPU core. In modern computers, you typically more. VirtualBox, to not overwhelm the host of the VM, only allows you to allocate up to HALF of the number of total cores. This example is running on a Mac Mini with 4 cores. So, I can only up this to two - but it does make a difference!
Next, by default, you get the minimal amount of video RAM which can cause you to run into problems with certain OS’es. So, up this to the maxmimum amount.
At this point we can finally click “Start” on the VM.
Upon first launch, VirtualBox assumes you want to install an operating system. So, this first screen is prompting you to (virtually) insert some media into the (virtual) DVD reader. Click on the little button to browse for files.
Next, click the Add button to add media to the “media library” that VirtualBox uses. You should navigate to your Downloads folder and point to that
ubuntu-22.04-desktop-amd64.iso file you downloaded. Once added, click “Choose” to use that as your boot media.
Then click “Start”:
Next, the Ubuntu installer will launch. You can either hit
At that point, you should be at the main screen of the Ubuntu installer. You can play around and see if Ubuntu is working correctly - but no files will be saved - OR you can install it on this virtual machine.
There is obviously a lot more to many parts of this. However, hopefully this was useful in at least getting Ubuntu up and running on a VM.