https://www.theroboticsspace.com/blog/How-To-Install-ROS-2-in-Ubuntu-22-04-On-M1-Mac/
How To Install ROS 2 in Ubuntu 22.04 On M1/M2 Mac
Table of Contents
The first step is more of a reminder. The Macbooks with M1/M2 Chip are ARM-based platforms compared to older MacBooks and Windows which are AMD/Intel x86-based platforms. Different virtual desktops are available like Parallels Desktop, Oracle’s Virtual Box, and UTM each having its pros and cons.
In this guide, we will use free UTM virtualization software. UTM allows Ubuntu to run with OpenGL, Hardware acceleration providing a highly efficient with near-native speed performance.
Prerequisites
- MacOS 13 or later
- 50GB of free space
1. Install UTM
Go to GetUTM and click the Download button. A UTM.dmg
file will start downloading.
Once the download is complete, double click on the UTM.dmg
file to open it. Drag the UTM icon to the Applications folder.
2. Download Ubuntu 22.04
Go to Ubuntu releases and download the latest Ubuntu 22.04 image for ARMv8/AArch64 architecture.
3. Create a new virtual machine
Open UTM and click on the + icon to create a new virtual machine.
4. Configure the virtual machine
Use Virtualize to simulate the virtual machine with arm64 CPU architecture.
Select Linux as the Guest OS and then the .iso file downloaded for Ubuntu 22.04.
Continue with the default settings for CPU, RAM, Storage, and Network.
5. Install Ubuntu 22.04
Click on the Play button to start the virtual machine. Then in the next screen, select Try or Install Ubuntu.
Once the Ubuntu 22.04 screen appears type ubuntu
as the password and press enter.
Click on the Install Ubuntu icon on the desktop to start the installation process.
Select the Normal Installation and *Install Third Party Software option and click on the Continue button.
Select the Erase disk and install Ubuntu option and click on the Install Now button.
Proceed with the installation process and create your user account.
Once the installation is complete, close the dialog box power off the system.
Eject the Ubuntu 22.04 iso file from the virtual machine.
Restart the virtual machine and login with your user account.
You have successfully installed Ubuntu 22.04 on your M1/M2 Mac.