Update tutorial installing ubuntu in utm authored by Alexander Douglas Yelovich's avatar Alexander Douglas Yelovich
# Tutorial: Installing Ubuntu in UTM # Tutorial: Installing Ubuntu in UTM
Author: Alvin Shen Author: Alvin Shen
# Table of contents: # Table of contents:
[[_TOC_]] [[_TOC_]]
# Preparing for Installing VM # Preparing for Installing VM
1. Ensure you have at least `40GB` of free space 1. Ensure you have at least `40GB` of free space
2. Download UTM from https://mac.getutm.app/ 2. Download UTM from https://mac.getutm.app/
3. Download the Ubuntu ISO installer: 3. Download the Ubuntu ISO installer:
- Arm Apple Silicon Mac: https://cdimage.ubuntu.com/releases/jammy/release/ubuntu-22.04.4-live-server-arm64.iso - Arm Apple Silicon Mac: https://cdimage.ubuntu.com/releases/24.04/release/ubuntu-24.04.1-live-server-arm64.iso
- Intel Mac: https://releases.ubuntu.com/22.04/ubuntu-22.04.4-desktop-amd64.iso - Intel Mac: https://releases.ubuntu.com/22.04/ubuntu-22.04.4-desktop-amd64.iso
# Creating the VM # Creating the VM
1. Double-click the downloaded `UTM.dmg` and drag the app to the Applications folder 1. Double-click the downloaded `UTM.dmg` and drag the app to the Applications folder
2. Open UTM from the applications menu 2. Open UTM from the applications menu
3. Click on the `Create a New Virtual Machine` button 3. Click on the `Create a New Virtual Machine` button
4. Choose `Virtualize`, then `Linux` 4. Choose `Virtualize`, then `Linux`
5. Click `Browse...` and then find the Ubuntu iso that you downloaded 5. Click `Browse...` and then find the Ubuntu iso that you downloaded
6. Leave the other options alone and click `Continue` 6. Leave the other options alone and click `Continue`
7. The default *Hardware*, *Storage*, and *Shared Directory* settings are fine, so just click `Continue` for those screens 7. The default *Hardware*, *Storage*, and *Shared Directory* settings are fine, so just click `Continue` for those screens
- Note: for the *Storage* options, the VM won't consume the entire `64GB` until it is needed - Note: for the *Storage* options, the VM won't consume the entire `64GB` until it is needed
8. On the *Summary* page you can give the VM a custom name like `r@m` and then click `Save` 8. On the *Summary* page you can give the VM a custom name like `r@m` and then click `Save`
9. Start the VM with the play button 9. Start the VM with the play button
10. Follow the *Apple Silicon Instructions* if you have an Apple Silicon Mac, otherwise follow *Intel Mac Instructions* 10. Follow the *Apple Silicon Instructions* if you have an Apple Silicon Mac, otherwise follow *Intel Mac Instructions*
11. Follow the *Post-Install* instructions 11. Follow the *Post-Install* instructions
# Intel Mac Instructions # Intel Mac Instructions
1. Once the GRUB screen loads, press `Return/Enter` on your keyboard to install `Ubuntu` 1. Once the GRUB screen loads, press `Return/Enter` on your keyboard to install `Ubuntu`
1. A "Display output is not active" message might be on your screen for a couple of seconds until the install screen appears 1. A "Display output is not active" message might be on your screen for a couple of seconds until the install screen appears
2. Once the installer loads, click on the `Install Ubuntu` button 2. Once the installer loads, click on the `Install Ubuntu` button
3. Ensure the keyboard layout matches your keyboard and click `Continue` 3. Ensure the keyboard layout matches your keyboard and click `Continue`
4. On the *Updates and other software* screen, choose `Minimal Installation` and then `Continue` 4. On the *Updates and other software* screen, choose `Minimal Installation` and then `Continue`
5. The default `Erase disk and Install Ubuntu` installation type is fine, so click `Install Now` and then `Continue` on the confirmation popup 5. The default `Erase disk and Install Ubuntu` installation type is fine, so click `Install Now` and then `Continue` on the confirmation popup
- Note: you can disregard the erasing all data warning since we're installing it in a VM - Note: you can disregard the erasing all data warning since we're installing it in a VM
6. Ensure the correct time zone is selected and then `Continue` 6. Ensure the correct time zone is selected and then `Continue`
7. Fill in the fields on the *Who are you?* screen with whatever you want. Just make sure you remember the username and password. It's also recommended to make the username a single word, all lowercase, and relatively short. 7. Fill in the fields on the *Who are you?* screen with whatever you want. Just make sure you remember the username and password. It's also recommended to make the username a single word, all lowercase, and relatively short.
8. The installation process will now begin. Let it install and update all the packages. 8. The installation process will now begin. Let it install and update all the packages.
9. When the installation complete popup appears, choose `Restart Now` 9. When the installation complete popup appears, choose `Restart Now`
10. Eject the iso with the disk icon in the top right of the window and then hit enter 10. Eject the iso with the disk icon in the top right of the window and then hit enter
![Screenshot of ejecting the disk in UTM on an Intel Mac](uploads/training/utm-eject-x64.png) ![Screenshot of ejecting the disk in UTM on an Intel Mac](uploads/training/utm-eject-x64.png)
# Arm Apple Silicon Instructions # Arm Apple Silicon Instructions
## Installing Ubuntu Server ## Installing Ubuntu Server
This process is entirely keyboard-only, so you won't be able to use your mouse to interact with anything. Use the `Arrow Keys` and the `Return/Enter` key to navigate the terminal interface. This process is entirely keyboard-only, so you won't be able to use your mouse to interact with anything. Use the `Arrow Keys` and the `Return/Enter` key to navigate the terminal interface.
1. Once the GRUB screen loads, press `Return/Enter` on your keyboard to Install `Ubuntu Server` 1. Once the GRUB screen loads, press `Return/Enter` on your keyboard to Install `Ubuntu Server`
2. A "Display output is not active" message might be on your screen for a couple of seconds until the install screen appears 2. A "Display output is not active" message might be on your screen for a couple of seconds until the install screen appears
3. Ensure `English` is the selected language and hit `Enter` 3. Ensure `English` is the selected language and hit `Enter`
4. Skip the installer update, so hit `Enter` 4. Skip the installer update, so hit `Enter`
5. Ensure `English (US)` is the selected keyboard layout and hit `Enter` 5. Ensure `English (US)` is the selected keyboard layout and hit `Enter`
6. The default *Network Connections*, *Proxy*, and *Mirror* settings are fine, so hit `Enter` for those 6. The default *Network Connections*, *Proxy*, and *Mirror* settings are fine, so hit `Enter` for those
7. The default *Storage* settings are also fine, so use the down arrow key until `Done` is selected and hit `Enter` 7. The default *Storage* settings are also fine, so use the down arrow key until `Done` is selected and hit `Enter`
8. The *Storage Summary* screen should look something like this. Hit `Enter`, and a warning will appear. You can safely ignore the warning and choose `Continue` since we're using a VM 8. The *Storage Summary* screen should look something like this. Hit `Enter`, and a warning will appear. You can safely ignore the warning and choose `Continue` since we're using a VM
9. Fill in the fields on the Profile Setup with whatever you want. Just make sure you remember the username and password. It's also recommended to make the username a single word, all lowercase, and relatively short 9. Fill in the fields on the Profile Setup with whatever you want. Just make sure you remember the username and password. It's also recommended to make the username a single word, all lowercase, and relatively short
10. Skip installing *OpenSSH* and choose `Done` 10. Skip installing *OpenSSH* and choose `Done`
11. Skip the *Server Snaps* and choose `Done` 11. Skip the *Server Snaps* and choose `Done`
12. Let the installer install and update all the packages, and choose `Reboot Now` when it's done 12. Let the installer install and update all the packages, and choose `Reboot Now` when it's done
13. After rebooting, eject the iso with the disk icon in the top right of the window, and then restart the VM. 13. After rebooting, eject the iso with the disk icon in the top right of the window, and then restart the VM.
- For some people, after installing the VM just boots into a black screen with a blinking cursor. Ejecting the iso should solve this. - For some people, after installing the VM just boots into a black screen with a blinking cursor. Ejecting the iso should solve this.
- ![Screenshot of ejecting the disk in UTM on an Arm Mac](uploads/training/utm-eject-arm.png) - ![Screenshot of ejecting the disk in UTM on an Arm Mac](uploads/training/utm-eject-arm.png)
## Install Ubuntu Desktop ## Install Ubuntu Desktop
1. Login with the username and password 1. Login with the username and password
- the password won't show anything on screen when you type, but it is working - the password won't show anything on screen when you type, but it is working
2. Run the follow command and enter your password. To run it you type it out, then press enter/return. 2. Run the follow command and enter your password. To run it you type it out, then press enter/return.
- If/when you see `[sudo]: password for`, you need to type your password. It won't show on screen when you type, but it is working. - If/when you see `[sudo]: password for`, you need to type your password. It won't show on screen when you type, but it is working.
```bash ```bash
sudo apt update && sudo apt upgrade -y && sudo apt install ubuntu-desktop-minimal -y sudo apt update && sudo apt upgrade -y && sudo apt install ubuntu-desktop-minimal -y
``` ```
3. Once all the packages are installed and there are no errors run `sudo reboot` 3. Once all the packages are installed and there are no errors run `sudo reboot`
# Post-Install # Post-Install
This is for both Apple Silicon and Intel Macs. This is for both Apple Silicon and Intel Macs.
1. Login to your account 1. Login to your account
2. Skip through the welcome application's *Online Accounts*, *Livepatch*, *Help improve Ubuntu*, *Privacy*, and *Extra Software* pages 2. Skip through the welcome application's *Online Accounts*, *Livepatch*, *Help improve Ubuntu*, *Privacy*, and *Extra Software* pages
3. Choose `Don't Upgrade` when the *LTS Upgrade Available* popup appears 3. Choose `Don't Upgrade` when the *LTS Upgrade Available* popup appears
4. Install software updates if the *Software Updater* popup appears 4. Install software updates if the *Software Updater* popup appears
5. Congrats you're done with setting up the Ubuntu VM! 5. Congrats you're done with setting up the Ubuntu VM!