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 OS X at the same time!

The following guide uses Ubuntu 15.04 (“Vivid Vervet”), but the steps and screenshots are nearly identical for Ubuntu 14.04 (and 14.04.02, “Trusty Tahr”) – the previous LTS release, and Ubuntu Kylin 16.04.2 LTS – the current LTS. Whether you’re installing 14.04, 15.04 or 16.04, you’ll have no trouble following along.

Using this method to install Ubuntu not only allows you to run it and OS X 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 OS X 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 OS X at the same time will “slow down” your Mac. The more memory you have, 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 the 64-bit version of Ubuntu. From that page you’ll be able to download either “Ubuntu 14.04.2 LTS” or Ubuntu 15.04 (to download 15.04, scroll down a bit). No matter which version you opt to download, select the 64-bit version, and remember – using this guide, you’ll have no trouble installing either version – the steps and screenshots are almost identical. Remember where you saved the file!
    2. Now you’ll need to download and install VirtualBox. Visit their download page and click the link titled “x86/amd64” next to VirtualBox 4.3.28 for OS X hosts (which is the current stable version). Once the download has completed, open the .dmg file and run the installer. When the very straight forward installation is done, launch VirtualBox from your Applications folder.
    3. When VirtualBox opens, click the New button.

    4. click to enlarge

    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. click to enlarge

    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 OS X. As illustrated in the screenshot below, my total RAM is 4GB, so I allocated half of it to Ubuntu, and the other half to OS X. The more memory you give to Ubuntu, the faster it will run. The drawback is that OS X 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. click to enlarge

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

    10. click to enlarge

    11. Now select VDI (VirtualBox Disk Image) and click Continue

    12. click to enlarge

    13. Select Dynamically allocated and yep – you guessed it – click Continue

    14. click to enlarge

    15. Give the “VirtualBox Disk Image” a name (again, doesn’t really matter, but descriptive is always helpful). 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 8GB. 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) – 8GB 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. click to enlarge

    17. Almost time to install Ubuntu! Click the Start button.

    18. click to enlarge

    19. Right away you’ll be prompted to locate a file. Click the “folder” icon next to menu that says Empty (see screenshot below).

    20. click to enlarge

    21. Navigate to the Ubuntu .iso file that you downloaded all the way back in step #1. Select it, and click Open

    22. click to enlarge

    23. Now click Start

    24. click to enlarge

    25. As Ubuntu boots for the very first time, VirtualBox will ‘pop up’ little messages explaining how the keyboard and mouse will work with your new ‘virtual machine’. Read them, then click the little X to close them.

    26. click to enlarge

    27. Finally! Click Install Ubuntu

    28. click to enlarge

    29. Ubuntu will run a quick test to ensure your computer is capable of running on it. Once it’s passed those tests, make sure to place a check in both of the boxes – Download updates while installing and Install this third-party softwarethen click the Continue button.

    30. click to enlarge

    31. Select Erase disk and install Ubuntu. NOTE: this is not going to ‘wipe out’ or erase any data in OS X. None. It is safe to click Install Now, so do just that.

    32. click to enlarge

    33. Click Continue

    34. click to enlarge

    35. When prompted, select your Time Zone and then click Continue

    36. click to enlarge

    37. Select the keyboard layout and language you want, then – yep – Continue

    38. click to enlarge

    39. Fill in each field with the required information. When you’re done, Continue

    40. click to enlarge

    41. Now it’s time to sit back and relax with that cup of coffee or tea. This may take a bit.

    42. click to enlarge

    43. Yay! It’s done! Click Restart Now

    44. click to enlarge

    45. If Ubuntu doesn’t start loading, and you’re left at a screen with what looks a bit like gibberish, have no fear. Click the OS X “Close” button (the red one in the upper left corner).

    46. click to enlarge

    47. Select Power off the machine and click OK. You’ll be left back at the window illustrated in step #10. Just click the Start button again.

    48. click to enlarge

    49. And you’ll boot into Ubuntu! Enter your password when prompted.

    50. click to enlarge

    51. Welcome to the Ubuntu Desktop! At this point you should be connected to the Internet and completely ready to go – have fun!

    52. click to enlarge

{ 30 comments… add one }
  • Evan Sitzes October 20, 2015, 9:35 pm

    Awesome, easy to follow, and up to date!

  • Steve Fister December 11, 2015, 2:50 pm

    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.

  • Eric February 11, 2016, 11:44 am

    Great article. Got up and running in a jif.

  • sara February 20, 2016, 6:33 am

    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?

  • Jaydev April 7, 2016, 2:08 am

    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 ?

  • Ross McKillop April 7, 2016, 11:26 am

    @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 :)

  • Chandrashekar M.M April 14, 2016, 1:22 am

    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)

  • Ross McKillop April 21, 2016, 1:50 pm

    Heya – sorry for the delay in answering! Looks like you’re trying to install the AMD version of Ubuntu instead of the x64/Intel.

  • Teemu Leisti June 20, 2016, 12:35 pm

    An excellent guide. Thank you.

  • yongle August 30, 2016, 10:21 pm

    with great detail, excellent!

  • Art Haedike September 26, 2016, 3:12 am

    Beautiful. Easy. Thank you!

  • Lei October 23, 2016, 11:26 am

    Thank you!

  • Sandeep Mohan November 3, 2016, 1:28 pm

    Thanks it worked for me. You made it very easy.

  • Florence Okosun November 24, 2016, 9:42 am

    wow thanks!

  • Reginaldo Vidal Canova December 20, 2016, 9:24 pm

    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?

  • Rafał February 12, 2017, 10:59 am

    Awesome! Thanks! :)

  • Prabhu June 5, 2017, 9:20 am

    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

  • Judith P. Oppenheim July 18, 2017, 8:57 am

    VirtualBox 4.3.28 for OS X is no longer supported: What do I do?

  • GRAHAM July 24, 2017, 11:29 am

    Great guide! Worked perfectly on 17
    Well done on providing such an accurate step by step.

  • bharath Sadashi October 19, 2017, 3:25 pm

    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.

  • hofffman hofffman November 20, 2017, 2:14 am

    the tutorial helped me a lot. Thank you very much!

  • Jan November 29, 2017, 9:21 am

    Thank you so much, this tutorial saved my day ! Worked beautifully !

  • ClearThinker December 5, 2017, 3:05 pm

    This is probably the best installation instruction that I have seen. Thank you!

  • PavlosVos December 10, 2017, 7:05 am

    Amazing dude, thanks a lot, worked like a charm

  • K April 2, 2018, 4:45 pm

    Thank you! Using mine now.

Leave a Comment