DEV Community

Cover image for How to Install Ubuntu Linux on Apple Silicon MacBooks
Andrew Baisden
Andrew Baisden

Posted on

How to Install Ubuntu Linux on Apple Silicon MacBooks

If you enjoy this topic, you will probably like my articles, tweets, and stuff. If you're wondering, check out my social media profiles and don't forget to subscribe and follow since I'm offering programming and motivating tools and information to help you achieve your dreams.

Linux is a really good operating system for development and many large corporations like Amazon use it for their backend. Today we will learn how to install and set up the popular Ubuntu Linux on Apple Silicon MacBooks. This has been tested and is working on macOS Ventura 13.1.

There are 3 good virtualisation tools available on Macs and we will be using two of them to install Ubuntu Linux. The list of 3 is:

Parallels Desktop for Mac (Paid but has a FREE trial)
VirtualBox (FREE)

We won't be using VirtualBox because as of writing it does not have good support for Apple Silicon MacBooks although it should work if you have an older Intel model.

UTM Setup

UTM is a virtualisation tool for ARM64 operating systems to operate on Apple Silicon at close to native speeds, UTM uses Apple's Hypervisor virtualization technology.

1. Download and install UTM

Before we begin the first thing that you will need to do is download the latest version of the macOS virtualisation software UTM.

2. Download the ARM version of Ubuntu

Next, you will have to download the latest version of Ubuntu Linux and ensure that it is the ARM version which will work on Apple Silicon computers.

You should be able to find the latest version in one of these links:

64-bit ARM (ARMv8/AArch64) desktop image

Ubuntu 22.04.1 LTS (Jammy Jellyfish)

3. Install and setup Ubuntu using UTM

Now use UTM to set up Ubuntu by configuring the settings for your personal setup. Follow the example setup and tailor it to your own preferences. This stage is the longest but it will be much faster when you have got it installed.

Select the Virtualize option.

Choose Linux for the Operating System

Use a similar configuration as below and use the browse button to find your Linux iso image.

Configure your hardware settings like in the example.

I chose 64GB storage you can use whatever you want just make sure its enough so maybe minimum 20GB.

You can choose a shared directory so it can connect to a folder in your macOS environment. I chose the Downloads folder you can choose any folder.

Just give it a name and select save.

Open the UTM settings menu and set the display to Retina so it's nice and sharp.

It's go time! Hit the play button and start it up!

Select the option for Try or Install Ubuntu and then eventually you will reach the Ubuntu home screen. We are almost done! In the bottom right-hand corner of the desktop, you will see an Install icon. Click on it and follow the setup until you get to the installation type screen.

Choose the first option it won't wipe your main macOS hard drive so don't worry! It's only using the virtual machine storage.

Create your user details and don't forget the username and password you will need that for the login!

Now restart your computer inside the VM and you should be at the Ubuntu homes screen after you login. Next you will probably need to install the latest updates for Ubuntu. If for whatever reason it crashes you can try to do the Ubuntu installation again or restart the VM to get it working.

4. Open the Terminal application

Open the applications menu and then start the Terminal application. Lets setup a basic starter development environment.

5. Make sure Ubuntu has the latest packages

Copy and paste these commands into the terminal and then press the enter key to run them. These commands will update all of your packages in Ubuntu.

sudo apt update
sudo apt upgrade
Enter fullscreen mode Exit fullscreen mode

6. Download and install Visual Studio Code

Download and install the latest version of Visual Studio Code and make sure that it is the Linux version that has the .deb file extension at the end

7. Install git

Use the commands below inside of your Terminal window to install git.

sudo apt install git
Enter fullscreen mode Exit fullscreen mode

8. Install zsh and Oh My Zsh (optional)

This step is optional but well worth it in my opinion.

Oh My Zsh is a delightful, open source, community-driven framework for managing your Zsh configuration. It comes bundled with thousands of helpful functions, helpers, plugins, themes, and a few things that make you shout...

Firstly install zsh using the command below in your Terminal.

sudo apt install zsh
Enter fullscreen mode Exit fullscreen mode

Then use this curl command to install Oh My Zsh. You can find the GitHub repo here

If you don't have curl installed then install it first.

sudo apt  install curl
Enter fullscreen mode Exit fullscreen mode
sh -c "$(curl -fsSL"
Enter fullscreen mode Exit fullscreen mode

9. Install npm and Node.js

Lets now install npm and Node.js which we are definitely going to need for installing JavaScript packages. You can find the latest versions of Node.js here

As of writing the latest version is Node.js v19.x. We can use the command below in our Terminal to install npm and Node.js.

curl -fsSL | sudo -E bash - &&\
sudo apt-get install -y nodejs
Enter fullscreen mode Exit fullscreen mode

10. Install Docker Engine

It is time for us to install Docker. Please be aware that at the moment the Docker Desktop application does not have a version for ARM unfortunately.

Docker Desktop on Linux runs a Virtual Machine (VM) so creates and uses a custom docker context desktop-linux on startup. This means images and containers deployed on the Linux Docker Engine (before installation) are not available in Docker Desktop for Linux. For more information see What is the difference between Docker Desktop for Linux and Docker Engine

They only have versions for Intel, AMD and Apple Silicon, there is no supported version for Linux. It's unfortunate but we can still use Docker we will just have to use the command line. Developers live in the command line anyway 😉 You can find all of the Docker commands here

Follow the steps in the Docker documentation to install Docker Engine on Ubuntu.

Parallels Desktop for Mac Setup

Since version 16.5 it also supports Macintosh systems with Apple silicon-based CPUs. Parallels Desktop for Mac is software that offers hardware virtualization for Macintosh computers with Intel processors.

1. Download and install Parallels Desktop for Mac

Go here and download it

2. Install and setup Ubuntu using Parallels

The Parallels Ubuntu Linux installation is considerably simpler because there is an automated setup. See the example images of the setup below to give you an idea. When you have completed the installation you can go to step 4. Open the Terminal application in the UTM setup to install your development environment because it's the same process.

If you like this article, chances are that you would like my posts, tweets and content as well. If you are curious, have a look at my social media profiles and don't forget to subscribe and follow because I am sharing programming and motivation resources and knowledge to support you in achieving your goals 💫

Top comments (6)

matteonaif profile image

Nice article! In the UTM installation there is not the step to unmount the ISO. If the CD/DVD is not cleared, after the restart, the installation run again.

andrewbaisden profile image
Andrew Baisden

Thanks did you manage to figure it out?

promisepreston profile image
Promise Chukwuenyem

I used VM Ware Fusion to install the Ubuntu Server ARM.
When the CD/DVD prompt popped up, I just pressed my Enter/Return key, and this made the OS to restart and complete its installation

stevewatanabe profile image
Steve Watanabe

Thank you for the info. I'm unable to get two UTM instances running ubuntu to ping each other though they are accessible by the host (mac running Sonoma). Any ideas are appreciated.

andrewbaisden profile image
Andrew Baisden

Did you find a solution?

stevewatanabe profile image
Steve Watanabe

I didn't pursue this further as my real need was met with a single node.