- Linux on mac hardware
- Installation Prerequisites
- Kali Linux Installation Procedure
- Kali Linux Installation Procedure
- Troubleshooting macOS/OS X
- Post Installation
- How to Run an Ubuntu Linux Virtual Machine on macOS running M1/M2 processor.
- Step #1 Install a Virtualization platform
- Step #2 Get an ARM-supported OS iso
- Step #3 Configuring a Linux VM on M1/M2 mac
- VM config step #1 Getting started with UTM
- VM config step #2 Choose Virtualization option
- VM config step #3Choosing the OS flavour
- VM config step #4 Linux VM Configuration
- VM config step #5 Hardware customization – Memory & CPU
- VM config step #6 Storage size settings
- VM config step #7 Shared Directory
- VM config step #8 Configuration Summary
- VM config step #9 Start the OS installation
- VM config step #10 Running the Ubuntu installer
- Conclusion
- The latest
Linux on mac hardware
IMPORTANT! Newer Mac hardware (e.g. T2/M1 chips) do not run Linux well, or at all. This is true for Linux in general, not just Kali Linux.
The model & year of the device will determine how successful your experience will be.
Installing Kali Linux (Single boot) on Apple Mac hardware (such as MacBook/MacBook Pro/MacBook Airs/iMacs/iMacs Pros/Mac Pro/Mac Minis), can be a straight forward, if the hardware is supported. Most of the time, there are a few issues that come up, so there is a bit of trial and error.
This guide will show you how to replace macOS/OS X with Kali Linux. However, if you wish to keep macOS/OS X, you will want to refer to our dual-boot guide instead.
In our example, we will be installing Kali Linux on a Mac Mini (Mid 2011) using macOS High Sierra (10.13). The same procedure has also been tested on a Mac Book Air (Early 2014) using macOS Catalina (10.15).
Installation Prerequisites
This guide will make the following assumptions:
- You have read our single boot Kali Linux install guide, as this has the same Installation Prerequisites (System requirements, setup assumptions and install media).
- Currently running macOS/OS X 10.7 or higher (later versions are more preferred) as this means the hardware is Intel (and not a PowerPC CPU).
- Depending on the Mac hardware model & year, you may find:
- Different results when trying to boot by using either a CD/DVD or a USB drive.
- You may be able to increase the chances of booting (especially older hardware and non-EFI) from a USB drive by having rEFInd pre-installed.
We will be wiping any existing data on the hard disk, so please backup any important information on the device to an external media.
Kali Linux Installation Procedure
- To start your installation, make sure you insert your Kali Linux installation medium and power on the device. Immediately press and hold the Option (or Alt) ⌥ key until you see the boot menu (rEFInd if installed, else the default macOS/OS X). You may or may not have a Recovery HD depending on your macOS/OS X setup.
- When the boot menu appears, if everything works as expected, you should see two volumes:
- EFI Boot — Newer hardware which support UEFI. It is common for GUID Partition Table (GPT) partitions to be used.
- Windows — “Non-EFI” boot. This use on older hardware which uses BIOS. You often see Master Boot Record (MBR) partition tables here.
If you only see one volume (EFI Boot), then the installation media is not supported for this device. This could be because the age of the firmware on the device.
You may wish to install rEFInd, as it is a boot manager, and try again.Even though Kali Linux is based on Debian, macOS/OS X always detects non-EFI boot media as Windows. We suggest that you select the EFI Boot volume to continue. However, if the installation hangs at this point, power cycle and select Windows (Being Kali Linux non-EFI/BIOS). The success depends on the Mac hardware’s model & year.
Kali Linux Installation Procedure
- The installation procedure from this point onwards is the same as our Kali Linux Hard Disk install guide.
- After that is complete, all that is left is to reboot, take out the installation media, and enjoy Kali Linux.
Troubleshooting macOS/OS X
If you have issues installing Kali Linux on macOS/OS X, there are a few options you can try:
- Install the latest version of macOS/OS X (App store, Recovery or USB) and applying any updates as this may upgrade the firmware.
- Install rEFInd boot manager to replace the default boot manager.
- If you’re using a DVD, refresh rEFInd once the drive has stop spinning by pressing ESC .
- Switch from EFI to BIOS boot when trying to boot Kali Linux.
- Switch from GPT drive to Hybrid MRB drive (using the Live image may help).
Post Installation
Now that you’ve completed installing Kali Linux, it’s time to customize your system.
The General Use section has more information and you can also find tips on how to get the most out of Kali Linux in our User Forums.
Updated on: 2023-Mar-06
Author: g0tmi1kHow to Run an Ubuntu Linux Virtual Machine on macOS running M1/M2 processor.
This guide will walk through the complete steps for configuring a Linux Ubuntu VM on M1/M2 Mac computers. To be precise, we will cover all the required steps to customize your first Linux VM to run in quickly.
Here are the steps at a high level before you start.
- Install the Virtualization platform, UTM
- Get an ARM-supported OS iso
- Configure a Linux VM on M1/M2 mac
- Getting started with UTM
- Choose Virtualization option
- Choosing the OS flavour
- Linux VM Configuration
- Hardware customization – Memory & CPU
- Storage size settings
- Shared Directory
- Configuration Summary
- Start the OS installation
- Running the Ubuntu installer
Step #1 Install a Virtualization platform
Software Virtualization has two primary components:
- Host Machine, in our case, this is your m1 / m2-based macOS
- Guest Machine, also called Virtual Machine or VM – in our case, is Ubuntu Linux.
The virtualization platform facilitates the guest os, a Virtual environment. Here we use UTM, so you can run a complete sandbox environment inside your Virtual Machine without impacting any other files on your host-machine base OS.
We have chosen UTM for ARM-based macOS since it is an Open source and a free solution. (there are other platforms available, such as Parallels and VMware Fusion).
- Download the free version of UTM virtualization software for your Apple silicon
- Install the UTM app on your macOS.
If you are using the UTM App on mac for the first time, I would recommend you to go to this article first:
Step #2 Get an ARM-supported OS iso
You would require an ARM-supported Linux Operating system to run Linux on M1/M2-based Mac.
Ubuntu and many other OS currently support arm architecture, and we will use Ubuntu in this guide.
Step #3 Configuring a Linux VM on M1/M2 mac
VM config step #1 Getting started with UTM
Firstly, Open your UTM app, and open a new VM creation menu (the plus symbol)
As mentioned before, please refer to this complete guide on UTM if required. Here is a preview of what the UTM Virtual Machine app console looks like:
UTM Virtualization on m1 mac
VM config step #2 Choose Virtualization option
New VM customization menu, select the Virtualize option.
VM config step #3Choosing the OS flavour
Under the Operating System selection, select Linux since we will be using Ubuntu Linux as our guest OS.
VM config step #4 Linux VM Configuration
From here on, you will get an advanced Linux VM customization menu.
From the first page, map your Ubuntu iso file, as shown below.
You can download the latest version of Ubuntu ARM isos from the official pages, and links are given below.
VM config step #5 Hardware customization – Memory & CPU
Memory – Under Hardware, you can set the RAM – Memory. I recommend leaving it at the default value (4096 or 4GB).
CPU Selection – again, do not change this unless you are aware of the performance issue to your host OS if you add more virtual CPUs to the guest.
VM config step #6 Storage size settings
I saw the default value is set to 64GB. If this is not suitable for you, you may change it. Please note the space you allocate here will be occupied by your host machine disk.
VM config step #7 Shared Directory
UTM provides a feature to share your MacOS directory with the Linux Guest. I did not use this feature here in this guide for simplicity.
VM config step #8 Configuration Summary
Finally, you will get a summarized view of your advanced VM configurations. You may edit it here, or a few options would be editable even after creating the VM.
VM config step #9 Start the OS installation
Your Virtual Machine hardware is ready with this step. You may change the settings or start the installation.
VM config step #10 Running the Ubuntu installer
When you are ready to start the OS installation, just click the play button and your OS installation menu will come, just like you are installing an OS on a physical computer.
You can follow the OS installation menu options to complete the Ubuntu installation step. I recommend you choose the default options provided by the install Wizard if you are unsure of your changes.
FAQ: Can I change the VM hardware setting after the OS installation
Yes! When the VM is in the stopped state, you can change most of ( not all ) the VM configurations after the Guest OS iinstallation.
Conclusion
This how-to guide has covered all steps required to run an Ubuntu Virtual Machine on macOS m1/m2 ARM architecture using UTM Virtualization. My experiment used a MacBook Pro M2, with 16GB Memory and 512GB SSD. The Ubuntu VM performance is excellent. Good luck with your new Virtual Machine development environment!
The latest
- Different results when trying to boot by using either a CD/DVD or a USB drive.