How to Install Ubuntu on Your Mac Using VirtualBox

This in depth guide will take you every step of the way through installing Ubuntu Linux on your Mac, by way of VirtualBox – a free and outstanding program. Using this method you’ll be able to run Ubuntu and macOS at the same time!

Please note: although this guide was initially authored in 2015, it has been updated (2020) to be current. The following guide uses Ubuntu 18.04.3 LTS “Bionic Beaver”, but the steps and screenshots are nearly identical for most versions of Ubuntu, up to including 20.04.1 LTS.

Using this method to install Ubuntu not only allows you to run it and macOS at the same time, you can really try out Ubuntu – and if you don’t like it – very easily get rid of it. Plus, it will not affect the files in macOS itself at all. None of the data on your Mac is at risk of being deleted or altered. The entire process is actually quite straightforward – and all of the software involved is free – so why not give it a shot :)

  1. Before you get started, there are a few things that should be noted up front.
    1. Depending on the speed of your Internet connection, it might take a while to download Ubuntu. During the actual installation process, based on the version of Ubuntu you opt to install – you may have to spend some time downloading updates as well.
    2. The installation time is about 20 minutes, depending on the speed of your Mac, amount of memory etc. You may want to make yourself a cup of coffee or tea before you start.
    3. Running both Ubuntu and macOS at the same time will “slow down” your Mac. The more memory you have and the faster your CPU and/or hard drive is, the less you’ll notice it.

    Let’s get started!

    1. First up, head over to the Ubuntu download page and download Ubuntu.
    2. Now you’ll need to download and install VirtualBox. Visit their download page and click the link OS X hosts (which is the current stable version). Once the download has completed, open the .dmg file and run the installer – the installation is as easy as clicking ‘next’ a bunch of times. When installation is done, launch VirtualBox from your Applications folder.
    3. When VirtualBox opens, click the New button.
    4. the main VirtualBox window with an arrow pointing at the New button

    5. Give your “virtual machine” a name (something descriptive is good, but it doesn’t matter). Make sure the Type: is set to Linux and the Version: is Ubuntu (64 bit). Then click the Continue button.
    6. setting options for an Ubuntu in VirtualBox on a Mac

    7. Now you’re going to decide how much memory (RAM) you’re going to allocate to Ubuntu when it’s running, and how much to leave for macOS. As illustrated in the screenshot below, my total RAM is 4GB, so I allocated half of it to Ubuntu, and the other half to macOS. The more memory you give to Ubuntu, the faster it will run. The drawback is that macOS will have less to use while Ubuntu is running. At a minimum, give Ubuntu at 1GB (1024MB) of RAM. When you’ve decided how much memory (RAM) to give Ubuntu, click the Continue button.
    8. allocating memory for a VM in VirtualBox

    9. On the Hard drive screen, select Create a virtual hard drive now and then click Create.
    10. creating a virtual hard drive in VirtualBox

    11. Now select VDI (VirtualBox Disk Image) and click Continue
    12. selecting a VM disk type

    13. Select Dynamically allocated and yep – you guessed it – click Continue
    14. an arrow pointing to a Continue button

    15. Use the “slider” to determine the size you want to make the “hard drive” for Ubuntu. At a minimum, you’ll want to select 6GB – and that will not allow for you to install many programs, let alone store files etc. Keep in mind that because you selected “Dynamically allocated” in the previous step, that does not mean that VirtualBox is going to take up that space right away. It means that as Ubuntu needs more space, it will allow the “hard drive” to increase up to whatever size you set at this step.

      As illustrated in the screenshot below, I opted to give Ubuntu 10GB. That’s enough for the installation and to install quite a few programs. Since I won’t be “storing” many files in Ubuntu (movies, pictures, music etc) – 10GB will suit my needs. Plus, I have a small hard drive on my MacBook Air. If you have a big hard drive, you might as well allocate more rather than less, again – the space won’t be used until it’s needed. After you’ve made your selection, click Create.

    16. allocating drive space to an Ubuntu VM

    17. Almost time to install Ubuntu! Click the Start button.
    18. an arrow pointing to a Start button
      click to enlarge

    19. If you’re using macOS 10.15 (Catalina) or later, you’re going to need to ‘allow’ Virtualbox to receive keystrokes from any application (which is completely safe). Click the Open System Preferences button.

      a macOS dialogue window with an arrow pointing to the Open System Preferences button

    20. Click the ‘lock’ icon in the bottom left corner of the screen. After entering your password, place a check in the box next to the Virtualbox item in the list.
    21. an arrow pointing to a Lock icon in the macOS System Preferences
      click to enlarge

    22. Click Later when prompted.
    23. an arrow pointing to a Later button

    24. Back in Virtualbox you’ll be prompted to locate a file. Click the “folder” icon next to menu that says Empty (see screenshot below).
    25. an arrow pointing to a folder icon in VirtualBox

    26. IF VirtualBox crashes right around now, or in the next step or two – check out the 13 minute 45 second mark of this video (link will open in a new tab/window). Hopefully there are no crashes and everything goes smoothly, but there is a known issue with Big Sur that may arise.
    27. Again, if you’re using macOS 10.15 or later, you’ll be prompted to grant permission for Virtualbox to access a folder. Click OK. You may be prompted to do this several more times – just click OK each time.

      a grant permissions window in macOS

    28. Navigate to the Ubuntu .iso file that you downloaded all the way back in step #1. Select it, and click Open
    29. a macOS Finder select a file window with an arrow pointing to an Open button
      click to enlarge

    30. Now click Start
    31. an arrow pointing to a Start button

    32. Finally! Click Install Ubuntu
    33. installing Ubuntu on a Mac in VirtualBox
      click to enlarge

    34. Select your keyboard layout and preferred language then click Continue
    35. the Select a Keyboard screen of the Ubuntu installation wizard
      click to enlarge

    36. Make sure to place a check in both of the boxes – Download updates while installing Ubuntu and Install third-party software for graphics and Wi-Fi hardware and additional media formatsthen click the Continue button.
    37. selecting installation options screen of the Ubuntu installation wizard
      click to enlarge

    38. Select Erase disk and install Ubuntu. NOTE: this is not going to ‘wipe out’ or erase any data in macOS. None. It is safe to click Install Now, so do just that.
    39. the selecting the installation method screen of the Ubuntu installation wizard
      click to enlarge

    40. Click Continue
    41. an arrow pointing to a Continue button in the Ubuntu installation wizard
      click to enlarge

    42. When prompted, select your Time Zone and then click Continue
    43. selecting a Time Zone to use in Ubuntu
      click to enlarge

    44. Fill in each field with the required information. When you’re done, Continue
    45. entering user info for setting up Ubuntu on a Mac
      click to enlarge

    46. Now it’s time to sit back and relax with that cup of coffee or tea. This may take a bit.
    47. installing Ubuntu on a Mac in VirtualBox
      click to enlarge

    48. Yay! It’s done! Click Restart Now
    49. an arrow pointing to a Restart Now button
      click to enlarge

    50. Hit Enter (the ‘return’ key on your keyboard) when prompted.
    51. the VirtualBox shutdown screen
      click to enlarge

    52. And you’ll boot into Ubuntu! Enter your password when prompted.
    53. booting into Ubuntu in VirtualBox
      click to enlarge

    54. Welcome to the Ubuntu Desktop! At this point you should be connected to the Internet and completely ready to go – have fun!
    55. the Ubuntu Desktop running in a VM on a Mac
      click to enlarge


    If this article helped you, I'd be grateful if you could share it on your preferred social network - it helps me a lot. If you're feeling particularly generous, you could buy me a coffee and I'd be super grateful :)

    buy a coffee for simplehelp.net


    Home » Linux » How to Install Ubuntu on Your Mac Using VirtualBox

30 thoughts on “How to Install Ubuntu on Your Mac Using VirtualBox”

  1. Nice work, everything was perfect as you mentioned in your tutorial. Thanks a lot and good luck on the next one.

  2. I tried installing on my MBP w touch bar… I couldn’t get the keyboard working. Then came across this guide to install it virtually… not only did I get ubuntu working. I can quickly switch between my Mac tasks and ubuntu swiftly. Thanks. helped a lot. I personally think this is better than installing as a bootable media on the hard disk.

  3. Hi Ross
    Thanks for your step-by-step and detailed tutorial, it was very easy to follow. I was able to install it on my Mac mini with ease

  4. Reginaldo Vidal Canova

    Thank you for the well described procedure. Unfortunetly for me, after the installation and restart, it returns to step 15 – as if the Ubuntu was not installed after all. Is there any advice to solve this problem?

  5. Chandrashekar M.M

    Hi Ross, I have downloaded – ubuntu-14.04.4-server-amd64.iso and VirtualBox-5.0.16-105871-OSX.dmg and installed Viertual box on my Mac os (v 10.11.3). After I tried to set up Ubuntu on virtual box and I am getting below error. Please help me. Thanks in advance.

    uncompression error
    Kernel Panic – not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
    …..
    …..
    Kernel offset : disabled
    [end Kernel panic – not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

  6. @disqus_S8P2MsGUoS:disqus – correct! Think of VirtualBox as any other program – when you’re not using it (and it’s closed) – it’s not using any RAM. When you uninstall it, you get all of your space back :)

  7. Whenever I’m not using Ubuntu, will my OSX use full ram ?
    Also when I uninstall Ubuntu and Virtual box later, will the allocated space be reclaimed by OSX ?

  8. i have problem in step 14 because it appear screen that i should select language then another step that do not mention in his steps please any recommended solution?

  9. If you have troubles installing Ubuntu on the VM where it crashes the installer with the message “Ubuntu error “Running post-installation trigger update-notifier-common””, recreate the VM and upon installation make sure you uncheck “Download updates while installing” (#16 in the instructions). This helped me get past the problem.

Leave a Comment

Your email address will not be published. Required fields are marked *