Thinking about trying out the latest version of Ubuntu? It looks amazing, boasts a host of updates, features, fixes, and stands out as the most well-known Linux operating system.
But how do you try Ubuntu without installing it on an old PC, or dual booting with your main operating system? The answer is a virtual machine – and you can make one in seconds with the free Oracle VirtualBox.
Here’s how to install Ubuntu 20.04 in VirtualBox on Windows, macOS, and Linux.
Why Install Ubuntu In VirtualBox?
There are many ways that you can try Ubuntu or any other Linux operating system (OS).
- Install it on an old PC
- Dual boot with Windows, macOS, or another Linux OS
- Install on Windows using the Windows Subsystem for Linux
- Run the Live CD version on your PC, which “installs” in the system memory until you reboot
- Install Ubuntu on a Raspberry Pi
- Create a virtual machine to install Ubuntu
This guide explains how to use a virtual machine (VM), a software environment that an operating system sees as a physical PC, to run Ubuntu. It doesn’t matter what operating system you have installed on your PC (referred to as the “host”), one or more can be installed in a virtual machine. Operating systems installed in a virtual machine are known as “guests.”
A virtual machine is the simplest option for trying out Ubuntu and other Linux operating systems.
How To Install Ubuntu 20.04 In VirtualBox
Creating a Linux virtual machine is straightforward with VirtualBox.
Five main steps are required to install Ubuntu on your computer in VirtualBox:
- Install VirtualBox
- Download the Ubuntu ISO file
- Configure a virtual machine for a Linux operating system
- Boot Ubuntu in the virtual machine
- Install Ubuntu in VirtualBox
1. Install VirtualBox On Your Computer
Start off by grabbing a copy of VirtualBox and installing it on your computer.
Download: VirtualBox (Free)
VirtualBox is available for Windows, Linux, and macOS. Installation will differ depending on your computer’s operating system, so check the detailed instructions on the VirtualBox download page.
Once installed, VirtualBox is ready for the creation of a new virtual machine. Before you do that, however…
2. Download The Ubuntu 20.04 LTS ISO File
To install Ubuntu on your virtual machine, you’ll need the installation media. For installation on a computer you would typically burn the ISO file to a DVD or USB stick.
Fortunately, if you’re installing Ubuntu in a VM, you can just use the downloaded ISO.
Various versions of Ubuntu are available. The safest option if you’re trying it for the first time is an LTS release. “Long Term Support” means the operating system receives targeted updates for five years after the point of release. It acts as the flagship Ubuntu operating system; if you experience problems, support can be found, and bug fixes issued.
Download: Ubuntu 20.04 LTS
Install A Pre-Configured Ubuntu VirtualBox Disk
The rest of this guide will show you how to install Ubuntu in a VirtualBox virtual machine. It’s straightforward, but a little intensive, and take a while to get right. You’ll learn how to actually install Ubuntu – but what if you just want to get it up and running right now?
Well, you could try a pre-configured disk image that you can simply load up in VirtualBox.
Various operating systems are available as easy-to-use disk images for VirtualBox and VMware at www.osboxes.com. These are available in VDI format, a virtual disk image that you can easily load in VirtualBox. Start by downloading the VDI file.
Download: Ubuntu 20.04 LTS VDI disk image
When you’re ready, attach it to VirtualBox:
- In VirtualBox, click New
- Enter the OS Name and Type then click Next
- Set the Memory size based on the default
- Click Next
- In the Hard drive screen select Use an existing virtual hard drive file and click on the folder icon
- Browse to the downloaded VDI file
- Select the VDI and click Open
- In the main VirtualBox window, select the new virtual machine and click Settings
- In Display increase video memory and Enable 3D Acceleration (this can be disabled if the VM fails)
- Click OK when you’re done
All you need to do now is select the virtual machine, click Start, and wait for it to load.
3. Configure A VirtualBox Virtual Machine For Ubuntu
If you’re installing Ubuntu manually, create and configure the VirtualBox virtual machine while the ISO downloads.
It’s important that you get this right or the Ubuntu 20.04 installation may fail.
- In VirtualBox click New
- Set a Name for the virtual machine (e.g. Ubuntu 20.04)
- Set the Type as Linux and the Version as Ubuntu (64-bit)
- Click Next
- Set the VM’s Memory size – aim for around 25 percent of your computer’s physical RAM
- Click Next
To run a virtual machine, you’ll need to create a virtual hard disk. This is an area of data stored on your computer’s own storage that is only accessible via the virtual machine.
It can have a strict storage limit, or can grow “dynamically” as it is used.
- Select Create a virtualized disk now then Create
- Check the default VDI is selected then Next
- Select Dynamically allocated for the virtual hard disk size, then Next
- Check the default options for the VDI’s storage location and minimum size
- Click Create
With the Ubuntu 20.04 VM selected, click Settings
- Find Storage
- Select Controller IDE
- In the Attributes pane click the disc icon next to IDE Secondary Master
- Click Choose a disk file and browse for the Ubuntu 20.04 ISO
- Click OK to add the ISO then OK to finish
The Settings screen is useful for making some other tweaks. For example, you can alter the number of processors, increase RAM, and more. Remember that the configuration of the virtual machine is limited by the physical specification of the host machine – your computer.
4. Boot Ubuntu In The Virtual Machine
Ready to run Ubuntu?
With the ISO file correctly attached to the virtual machine’s virtual optical drive as above, select the VM and click Start. Moments later, the virtual machine will load up.
Here you’ll have two options: Try Ubuntu and Install Ubuntu.
To look at Ubuntu before installing, the Try Ubuntu option is most suitable. If you want to go ahead and install, click Install Ubuntu.
5. Install Ubuntu In VirtualBox
At this stage, Ubuntu is basically the Live CD version. You can use it, connect to the internet, create files, etc., but they’re all stored in the virtual machine’s memory. Once you shut this virtual machine down or reboot, everything is lost.
If you like what you see so far, double-click the Install Ubuntu icon on the desktop. This will commence the installation wizard. Select the virtual machine’s hard disk drive, then set your language and region when prompted.
A few minutes later, the virtual machine will reboot. It should automatically eject the ISO, so click Enter to proceed. If this doesn’t happen, close the VM window then:
- Select the Ubuntu 20.04 VM
- Click Settings > Storage
- Click the Optical Drive icon
- Select Remove Disk from Virtual Drive
- Click OK
Then select the Ubuntu guest OS and click Start. Moments later, you’ll be using Ubuntu 20.04 in your VirtualBox VM.
Run Multiple Guest Operating Systems With VirtualBox
If you’ve made it this far, you should have either installed Ubuntu 20.04 in VirtualBox or be ready to. The instructions above should tell you everything you need to know.
You don’t have to stop with Ubuntu, however. Multiple operating systems can be installed in VirtualBox, from Windows and Linux OSs, to Chrome OS and macOS. VirtualBox is an incredibly versatile utility that lets you use almost any operating system regardless of what is installed on your computer.Source