Getting started with Ubuntu 18 in VirtualBox
This article will step through how to install Ubuntu on Windows 10 using VirtualBox. For this turotial I’ll be using Windows 10 Pro 64-bit (the host) and explain how to run Ubuntu 18.04.1 (the guest) as a virtual machine.
Step 1: VirtualBox installation
If you already have a working installation of VirtualBox you may skip this section.
First, download VirtualBox from https://www.virtualbox.org/wiki/Downloads. I’ve downloaded VirtualBox 6.0.4
Run the executable and follow the prompts to complete the installation wizard.
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 which at the time of writing is Ubuntu 18.04.1 LTS.
Download the latest Ubuntu release from https://www.ubuntu.com/download/desktop.
Open VirtualBox and click New
Enter the Name for the virtual machine, like
Ubuntu 18. VirtualBox will try to predict the Type and Version based on the name you enter. Otherwise, select:
and click Next.
Now you need to specify how much memory to allocate the virtual machine. According to the Ubuntu system requirements we need at least 2GB, 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 2GB.
Set the memory to
2048MB (2 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 wish…) 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 name and size. The Ubuntu system requirements recommend 25GB. Remember, we choose 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 we specified. Click Create
Step 3: Configure the virtual machine settings
You should be back on the main VirtualBox screen now. Ensure the Ubuntu 18 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 (highlighted in the screenshot below) and select Choose Virtual Optical Disk File…
Browse to the downloaded file
ubuntu-18.04.1-desktop-amd64.iso, select it, and click Open.
Click OK to close the Settings dialog window. The virtual machine is now ready to start.
Step 4: Install Ubuntu 18
In VirtualBox your VM should be showing as Powered Off, and the optical drive configured to point to the Ubuntu ISO file.
In VirtualBox, select the virtual machine Ubuntu 18 and click Start.
VirtualBox will launch a new window with the vm and boot from the iso.
It may take 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
This step may take a few minutes to complete.
Select your timezone and click Continue
Enter a your name, computer name, username and password, then click Continue
The Ubuntu installation will take several minutes to complete, so have another coffee.
After the installation is finished you will be prompted to restart the VM. Click Restart Now
When the vm reboots you may see this message:
From the 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.
If all went well the VM should boot to the Ubuntu login screen. Select your user and enter the password to login.
As a final step, you should apply any updates. For these steps, see the article How to check for updates in Ubuntu 18 Desktop.
You have now completed the install of Ubuntu 18 running in VirtualBox on Windows 10.
Step 5: 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 18 and click Settings.
In the left pane select Display.
Adjust the Video Memory to 128 MB.
Click OK to save the changes.
Install Guest Additions
Finally, if you wish to install the VirtualBox Guest Additions in Ubuntu 18, please see this article for instructions.