- Visit the official download page: https://www.virtualbox.org/wiki/Downloads
- Download the OS X hosts DMG.
- Open the DMG and run the installer. macOS may warn about system extensions – allow them in System Settings → Security & Privacy and reboot if prompted.
- Launch VirtualBox → New.
- Name:
Ubuntu 22.04. - Type: Linux, Version: Ubuntu (64-bit).
- Allocate Memory: 4096 MB (or more if you have RAM).
- Create a Virtual Hard Disk → VDI, dynamically allocated, size 25 GB (or larger).
- Select the new VM → Settings → Storage.
- Under Controller: SATA, click the empty optical drive, then the CD icon → Choose a disk file.
- Browse to the Ubuntu ISO you downloaded (e.g.,
~/Downloads/ubuntu-22.04-desktop-amd64.iso).
- System > Motherboard: Enable EFI if the ISO is EFI‑based.
- Processor: Allocate 2‑4 CPU cores.
- Display > Screen: Increase Video Memory to 128 MB and enable HiDPI for retina displays.
- Click Start. The VM boots from the ISO.
- Choose Install Ubuntu (or Try Ubuntu first).
- Follow the standard Ubuntu installer steps (keyboard, updates, installation type → Erase disk and install Ubuntu – this only erases the virtual disk).
- When the installer asks to remove the installation medium, go back to Settings → Storage and detach the ISO, then reboot the VM.
- Install Guest Additions for better mouse/clipboard integration:
sudo apt update && sudo apt install -y build-essential dkms linux-headers-$(uname -r) sudo apt install -y virtualbox-guest-utils
- Shared Folders: In VirtualBox settings → Shared Folders → Add a folder from macOS, then mount inside Ubuntu:
sudo mkdir /mnt/shared sudo mount -t vboxsf SharedFolderName /mnt/shared
- Adjust display resolution via View → Auto-resize Guest Display.
Tip: Take a snapshot after a fresh install; you can revert to it if you want to try a different configuration.