How to install Ubuntu 20 in VirtualBox
This article will step through how to install Ubuntu Desktop on Windows 10 using VirtualBox. For this turotial I will be using Windows 10 Pro 64-bit (the host) and will explain how to run Ubuntu Desktop 20.04.1 LTS (the guest) as a virtual machine. Also covered are tips on configuring the display settings and installing VirtualBox Guest Additions.
VirtualBox is a free and open-source virtualization platform by Oracle, and is popular for running a variety of virtual machines. Ubuntu 20.04.1 LTS is the latest long-term support version of the popular Ubuntu Desktop OS.
Step 1: VirtualBox installation
If you already have a working installation of VirtualBox you may skip this section.
First, download the VirtualBox Windows host from https://www.virtualbox.org/wiki/Downloads. I’ve downloaded VirtualBox 6.1.14
Run the executable and follow the wizard prompts to complete the installation.
Before completing the wizard you will get a warning that the network connection will temporarily be interrupted, so make sure you’re not doing anything that may be impacted (like being half-way through downloading a 16GB file that can’t be resumed).
Step 2: Create a new Ubuntu virtual machine
I’ll be installing the latest LTS (Long-term support) version of Ubuntu Desktop which at the time of writing is Ubuntu 20.04.1 LTS.
Download the latest Ubuntu release from https://ubuntu.com/download/desktop.
Open VirtualBox and click New.
Enter a Name for the virtual machine, for example
Ubuntu 20 LTS. VirtualBox will try to predict the Type and Version based on the name you enter. Otherwise, select:
and click Next.
Now you will be prompted for Memory size and will need to specify how much memory to allocate the virtual machine. According to the Ubuntu system requirements we need at least 4GB, but I’d recommend more if your host can handle it. The higher you can set the memory without severly impacting your host machine, the better the performance of the guest machine. If you’re not sure, stick with 4GB. You can adjust this later if needed.
Set the memory to
4096MB (4 GB) and click Next.
On the Hard disk screen, select Create a virtual hard disk now and click Create
On the Hard disk file type screen, accept the default option VDI (VirtualBox Disk Image) (or change it if you want…) and click Next
Next we are prompted for Storage on physical hard disk. The options are Dynamically allocated and Fixed size. We’ll use the default of Dynamically allocated. Click Next.
Enter the hard disk File location and size. The Ubuntu system requirements recommend 25GB. Remember, we chose Dynamically allocated as our storage option in the last step, so we won’t consume all this disk space immediately. Rather, VirtualBox will allocate it as required, up to the maximum 25GB (or whatever value you specify here). Click Create
Step 3: Configure the virtual machine settings
You should be back on the main VirtualBox screen now. Ensure the Ubuntu 20 LTS virtual machine is selected then hit Settings.
In the left pane select Storage, then in the right pane under
Controller: IDEselect the CD icon with the word Empty beside it.
In the far right pane under Attributes click the CD icon and select Choose/Create a Virtual Optical Disk…
The Optical Disk Selector window will be displayed. Click the Add button.
Browse to the downloaded file
ubuntu-20.04.1-desktop-amd64.iso, select it, and click Open.
In the Optical Disk Selector window, ensure the iso file is selected, then click Choose.
If done correctly, you will see the Ubuntu 20 iso appear under the Controller: IDE storage device.
Click OK to close the Settings dialog window.
Step 4: Install Ubuntu 20
In VirtualBox, your VM should be showing as Powered Off, and the optical drive configured to point to the Ubuntu ISO file as per the previous step.
In VirtualBox, select the virtual machine Ubuntu 20 LTS and click Start.
VirtualBox will launch a new window with the vm and boot from the iso selected in a previous step.
Wait a few minutes for Ubuntu to load. When prompted, click Install Ubuntu.
Select your keyboard layout (or accept the defaults) and click Continue.
Use the default options Normal installation and Download updates while installing Ubuntu, then click Continue.
Accept the default option Erase disk and install Ubuntu, then click Install Now.
You will be prompted with a warning that the changes will be written to disk. Click Continue.
Note: this step may take a few minutes to complete.
Select your timezone and click Continue.
Now you need to create the root account for Ubuntu. Enter your name, computer name, username and password, then click Continue.
The Ubuntu installation will take several minutes to complete, so put your feet up or make a coffee.
After the installation is finished you will be prompted to restart the VM. Click Restart Now.
When the vm reboots you may see a message
Please remove the installation medium, then press ENTER:
From the VirtualBox menu select Machine > Settings.
On the right side, select Storage to show the screen where we previously selected the
isofile. If the Ubuntu iso file is still there, remove it. Otherwise close the Settings window, then in the VM press Enter to finish booting Ubuntu.
If all went well, the VM should boot to the Ubuntu login screen. Select your user and enter your password to login.
As a final step, it is best practice to apply any available updates.
You may be automatically prompted to install updates after first logging in and can simply hit Install Now.
Otherwise, you can follow the steps in my article How to check for updates in Ubuntu 18 Desktop (the same steps still apply for Ubuntu 20).
You have now completed the install of Ubuntu 20 in VirtualBox on Windows 10.
Adjust Display settings
By default the VM will only have 16 MB video memory. I have found this is not enough, especially once VirtualBox Guest Additions are installed. I recommend changing this to 128 MB if your host system can handle it.
Ensure the virtual machine is not running.
In VirtualBox, select the virtual machine Ubuntu 20 LTS and click Settings.
In the left pane select Display.
Adjust the Video Memory to 128 MB.
Click OK to save the changes.
Install VirtualBox Guest Additions
Finally, if you wish to install the VirtualBox Guest Additions in Ubuntu 20, please see this article for instructions.