Installing Ubuntu 18.04 On Mac OS With VirtualBox

How To Install Different Linux Distributions On Mac OS Mojave

Manny
8 min readJul 28, 2019
Installing Ubuntu 18.04 On Mac OS with VirtualBox

This is a very basic walkthrough tutorial on how to install Ubuntu 18.04, or different Linux Distributions, on your Mac OS using Virtual Box.

It’s very important to note that at the time of writing this, it is July 2019 and these steps might differ as different versions of VirtualBox and Ubuntu are released.

Why Do This

There are few reasons why you’ll want to do this, but my main reason is to able to install and use Ubuntu without having to partition my hard drive and install Ubuntu locally on my computer.

There are ways to install Ubuntu natively on your computer, but this method allows you to use both at the same time.

This is also so that I can complete the Linux Foundation Certified SysAdmin (LFCS).

https://training.linuxfoundation.org/certification/linux-foundation-certified-sysadmin-lfcs/

Requirements

To make sure you have the requirements for this, you just need:

  • Mac OS Mojave
  • 2 GB RAM that can be dedicated
  • 10 GB of storage (although that can be tweaked)

Tools We’ll Need

  • VirtualBox — A virtualizer that runs virtual machines
  • Ubuntu OS — The Linux OS we’ll be running in VirtualBox

What Is VirtualBox?

Basically open-source software that allows us to run multiple different Operating Systems on top of our Mac OS, including Windows, Linux and even Mac OS with Virtual Machines, which are just emulations (which are close to native running) of operating systems.

VirtualBox is also a Hypervisor.

What Is A Hypervisor?

Also known as a Virtual Machine Monitor, which can either be software, firmware, or hardware that allows Operating Systems to run on top of it. In this case VirtualBox is a Type 2 Hypervisor, which sits on top of an OS and allows you to run other Operating Systems.

Install Virtual Box

Our first step to installing Ubuntu on our Mac OS is to install VirtualBox.

https://www.virtualbox.org

Download VirtualBox for OS X Hosts.

Download For OS X Hosts

Make sure to Double click the VirtualBox.pkg file.

VirtualBox Installation Successful

If you run VirtualBox now, you should see the following:

VirtualBox

Download Ubuntu

The next step is to download Ubuntu locally to our computer to use with VirtualBox. Your first step is to go to https://ubuntu.com/download.

You’ll want to click on Ubuntu Desktop.

https://ubuntu.com/download

What Is LTS?

Here you’ll be presented with a couple of options, but you’ll want to download Ubuntu 18.04.2 LTS. LTS stands for Long-Term Support, which means this release will be supported by the developers of Ubuntu for a while.

Download Ubuntu 18.04.2 LTS

Once downloaded, the file will probably sit in your downloads as ubuntu-18.04.2-desktop-amd64.iso. This is our image archive file of the operating system, which we’ll need later.

New Machine

Next, we’ll want to create a new machine in Virtual Box by clicking on New, or going to Machine > New, or doing ⌘ + N.

Once the prompt opens, give it a Name (if you start typing ubuntu, it will automatically convert the version to Ubuntu 64-bit), and set the Memory to 2048 MB (2GB). Make sure you set the Hard Disk option to Create a virtual hard disk now. Leave the rest of the options as is and click Create button.

New VirtualBox Machine Settings

This will then prompt us to define the settings for our new virtual hard disk.

Set the File size will be set to 10.00GB to give the Ubuntu file enough space to work with, the Hard disk file type to VDI to make an image formatted for VirtualBox, and allow the Storage on physical hard disk to be Dynamically allocated. Once done, click the Create button.

New VirtualBox Image Settings

Once your new machine settings are setup, you should see the following:

New Machine Successfully Created & Configured

Install Ubuntu Image

Notice we haven’t touched our ubuntu-18.04.2-desktop-amd64.iso file yet. This is the next step. Right click on our new machine and go to Start > Normal Start or select the machine and just click the Green Start Arrow Icon. We’ll soon be prompted with the following, where we’ll now select our file, and click Start.

Selecting Our Ubuntu ISO Image for our New VirtualBox Machine

Ubuntu will start but we might get this tiny screen at start.

Ubuntu 18.04 First Loading

To temporary fix this before we configure our display setting in Ubuntu directly, click the fifth icon from bottom right and go to Virtual Screen 1 > Scale to 200% (autoscaled output).

We should see something slightly bigger, where you can now click Install Ubuntu.

Ubuntu 18.04 Installation

NOTE: If at any time you need to get out of the Virtual Machine / Ubuntu, just press the left ⌘ twice.

The next prompt will ask you what your keyboard setting might be. I’ve set them to English (US). Once you’ve selected your option, click the Continue button.

Ubuntu 18.04 Installation Keyboard layout settings

Just to get those alert prompts at the top out of the way, click the x button.

Removing the alter prompts

For the sake of this walkthrough, we’ll go with the Normal Installation and Download updates while installing Ubuntu. Click the Continue button.

Ubuntu 18.04 Install — Updates and other software

This next step might look scary but there is nothing for Ubuntu to delete except for what the size and storage we allocated it. Select Erase disk and install Ubuntu, and click the Install now button.

Ubuntu 18.04 Install — Installation Type

You’ll also be prompted to confirm your selection with the following prompt, just click the Continue button.

Ubuntu 18.04 Install — Confirm Installation

Next we’ll select our location for the timezone, type and set your location, click the Continue button.

Ubuntu 18.04 Install — Where are you?

Lastly, we’ll give our name, our computer name, username, and give it a password.

The installation will wrap up and you’ll just need to restart.

Ubuntu 18.04 Install — Installing

Small note when you get to this screen, you’ll need to press Enter for things to restart.

Ubuntu 18.04 Install — Restart

It’ll finish loading and then the login will present itself. Enter your credentials and let Ubuntu load up.

Ubuntu 18.04 Install — Login

When you get to the Desktop, you’ll be presented with What’s new in Ubuntu, and the screen resolution is still very small.

Ubuntu 18.04 Install — Ubuntu Desktop

The last thing we’re going to do is fix the screen resolution in the settings by going to the 9 dots in the bottom left and searching for Settings.

Ubuntu 18.04 Install — Settings

Once settings shows up, scroll to the bottom with the left sidebar until you see Devices and click on it.

Ubuntu 18.04 Install — Settings Devices

It will be hard to see but select the new resolution from the dropdown.

Ubuntu 18.04 Install —Displays

It will prompt you the top right to apply these changes, but unfortunately you can’t click Apply because it’s not within the view of the resolution of the window. To get access it to, double-click the top navigation bar where it says Displays, and then drag the window from right to left until you see the Apply button.

Ubuntu 18.04 Install — Apply Changes

The resolution will change, and you’ll be prompted to confirm if you want to keep these changes. If it doesn’t fit your screen, leave it for a few seconds and it will reset back, otherwise click Keep Changes.

Ubuntu 18.04 Install — Display Settings — Keep Changes

There we go, we’ve fully set up Ubuntu 18.04 with VirtualBox on Mac OS.

Ubuntu 18.04 Install — Ubuntu Display Configured

From Here

Now you can use Ubuntu on Mac OS, install whatever apps you want, and still have access to you native OS controls and more.

If you got value from this, and/or if you think this can be improved, please let me know in the comments.

Please share it on twitter 🐦 or other social media platforms. Thanks again for reading. 🙏

Please also follow me on twitter: @codingwithmanny and instagram at @codingwithmanny.

Consider Contributing

One last thing I will say, is you feel like contributing to other Open-Source projects, consider contributing the Ubuntu to keep it free and allow other developers to work on it to make it better.

https://ubuntu.com/download/desktop/thank-you

--

--

Manny
Manny

Written by Manny

DevRel Engineer @ Berachain | Prev Polygon | Ankr & Web Application / Full Stack Developer