How To Install Ubuntu On Virtualbox Mac

Virtualbox is open-source free software that can host Windows, Linux, macOS, and other operating systems in a virtual machine. It is owned by Oracle company. It can be installed and run on macOS, Linux, and Windows. In this article, we will focus on how to install Virtualbox on macOS, and we will create a virtual machine that installs Ubuntu on Virtualbox mac version. It will also tell you how to resolve some common issues when you install Ubuntu on the Virtualbox mac version like below.

  1. How to enable copy & paste between hosts ( macOS ) and guest (ubuntu virtual machine os).
  2. How can you find and execute ubuntu applications in guest os?
  3. How to fix error “host os (macOS) can not ping guest os (ubuntu virtual machine)”.
  4. How to fix keyboard not working error.

1. Install Virtualbox For Mac.

  1. First of all, you should download Virtualbox MacOS version.
  2. Then install Virtualbox macOS version by clicking the downloaded dmg file. Follow the setup wizard to successfully install it.

2. Install Ubuntu On Virtualbox ( Mac Version ) Virtual Machine.

  1. Launch Virtualbox on macOS.
  2. Create a new virtual machine by clicking the New button, then input a virtual machine name in the Name input text box,  select the guest OS type ( Linux ) from the Type drop-down list. Then in Version drop-down list select guest OS version Ubuntu(64 – bit)
  3. In the next wizard, click Continue button and adjust the virtual machine’s hard disk size,  memory size, and CPU processor number.
  4. After you adjust all the settings like below picture, the new ubuntu virtual machine is ready to install.
  5. Before you install Ubuntu Linux OS, you should download ubuntu iso file to a local folder.
  6. Click to select the virtual machine in the left virtual machine list panel, click Settings tab button at the top menu bar, then click Storage tab button at the popup window top menu bar. Select the laser disk in the left Storage Devices list panel, then click the laser disk icon after Optical Drive label on right side and click Choose Virtual Optical Disk File… menu item to select the ubuntu iso file which you had downloaded in step 5.
  7. Select the virtual machine and click the right mouse key, then click Start —> Normal Start menu item in the popup menu list to launch ubuntu Linux os install process.
  8. After some text scrolling on the screen, it will popup below install ubuntu GUI wizard. In the first wizard dialog, there are two buttons Try Ubuntu and Install Ubuntu. The Try Ubuntu button will let you use the ubuntu os from the iso file without modifying the virtual machine disk files. The Install Ubuntu button will install ubuntu Linux os on the virtual machine.
  9. Choose Keyboard layout language which you are preferred in the next wizard dialog, then click the Continue button.
  10. The next wizard dialog will let you choose what software will be installed in ubuntu os. I choose Normal installation radio button, it will install a web browser, utilities, office software, games and media players, etc.
  11. In the next wizard dialog, if you do not need the data in the virtual machine anymore, and you want the installer to manage disk partitions, you can choose Erase disk and install Ubuntu radio button, this will use all default settings(partition settings, etc) for this ubuntu os. If you want to manage the virtual machine disk partition by yourself, you can choose Something else radio button to customize the ubuntu os installation.
  12. The final step is to create a user account that is used to login to ubuntu. Please remember the username and password carefully.
  13. Now ubuntu Linux os has been installed on Virtualbox virtual machine successfully. Our version is ubuntu 18.04.1 desktop version. When you start it and login with your account, you can find it is stable like MacOS and it is easy to use like Windows. In the next article, we will tell you how to configure SSH in the ubuntu Linux OS and how to login into it remotely.

3. Find And Execute Application In Ubuntu Linux OS.

When you want to run ubuntu applications, you can follow below steps.

  1. Click the Show Applications button at the left bottom of ubuntu desktop.
  2. Input application name ( for example Terminal ) in the search box at top, then the related application will be displayed below it. Click the application icon to start it.

4. Enable Copy & Paste Between Host (Local Machine) And Guest (Virtual Machine) OS.

To enable copy and paste between host and guest OS, you need follow below steps.

  1. Start the virtual machine, and click Devices —> Insert Guest Additions CD image… menu item at top VirtualBox VM toolbar.
  2. Then it will mount a disk in the guest Ubuntu virtual machine OS like below, it will prompt you to run it, click Run button and this will install the guest additions cd image.
  3. If you meet below error messages when clicking the Devices —> Insert Guest Additions CD image… menu item, this means the cd image has been mounted in the guest os already, so you just need to run it in the ubuntu virtual OS manually.
    Unable to insert the virtual optical disk /Applications/ into the machine Ubuntu.
    Could not mount the media/drive ‘/Applications/’ (VERR_PDM_MEDIA_LOCKED).
  4. You can also run sudo apt-get install virtualbox-guest-utils command in terminal to install the guest additions support packages to enable copy & paste function.
  5. Now to enable Copy & Paste between host and guest OS, you also need to set shared clipboard configuration value in the VM general advanced settings.
  6. Right-click the virtual machine in left panel and click Settings… menu item in the popup menu item list.
  7. Click General —> Advanced, then select Bidirectional menu item in both Shared Clipboard and Drag’n’Drop drop-down list. Click OK to save the settings and restart the virtual machine, now you can copy and paste data between host and guest OS successfully.

5. Resolve Can Not Ping Virtual Machine OS Issue.

Now the Ubuntu virtual machine has been installed and you have created an admin account for it. You can log in to the system with that account. But when you want to access it from another machine, you should first find the ubuntu virtual machine’s external IP address with the command ifconfig.

  1. Open a terminal in ubuntu, and run ifconfig command in it.
    [email protected]:~$ ifconfig
    enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
    inet netmask broadcast
  2. If you get the error message Command ‘ifconfig’ not found, you can run command $ sudo apt install net-tools to install it.
  3. The IP address after inet ( in red color ) is just the IP v4 IP address of this virtual machine.
  4. But when you ping this IP address from your host os, it will show a request timeout error, this is because your virtual machine is not configured correctly.
  5. Open the virtual machine Settings dialog again, then click Network —> Adapter1. Change the Attached to drop-down list value from NAT to Bridged Adapter. Then restart the ubuntu os, now you can ping the ubuntu os from host os.

6. How To Fix Keyboard Not Working Error.

  1. Sometimes you may encounter a keyboard has no response error after press the Enter key at the beginning of the installation.
  2. Solution 1: Turn off the virtual machine, then open the VM Settings dialog, click Display —> Screen, adjust Video Memory to a big number such as 128M.
    adjust virtualbox vm - display - screen - video memory value
  3. Solution 2: Open the VM Settings dialog, click System button at the top area, then increase Base Memory value to a bigger number such as 4GB.
  4. Solution 3: Open the VM Settings dialog, click User Interface —> Input dropdown list, uncheck and check the checkbox before the Keyboard item.
    virtualbox - vm - settings - user interface - input
  5. Solution 4: Install VirtualBox extension package that fit your VirtualBox version ( How To Install Virtualbox Extension Pack Correctly ). Check whether USB3 has been enabled in the Virtual Machine, if not then enable it. Exit and power off all VirtualBox instances, then run command VBoxManage setextradata "$Your_Virtual_Machine_Name" VBoxInternal2/EfiGraphicsResolution X in a command-line window. You can refer article How To Fix Mouse And Keyboard Stuck After Install Mac OS On VirtualBox
0 0 votes
Article Rating
Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Oldest Most Voted
Inline Feedbacks
View all comments

Hi , I am stuck at Step 8, Ubuntu is failing to install. It goes through the install process 100%,yet Aborts after the reboot.


Superb… best one.


At step 11 the installation has started. But its been 2 hours and i see messages : Out of memory kill process XXXX core 2 or sacrifice child. I see only out of memory messages.
I have followed the default options as shown in the screenshot.


I got to step 9, and after choosing my language and clicking continue, nothing happened. It stayed on the same screen. So I waited a while and went off to do other things while it worked itself out. When I came back and turned my computer on, the screen had gone black, and there was some text on the screen. I couldn’t type or do anything. So I closed it out and opened it back up again. The problem persists.

Tony Woodhouse
Tony Woodhouse

Great! Thanks Jerry


how long should it take after step 11, to get to step 12?
my Mac just seems to be hanging and not moving on to the next step.
its been about 10 minutes now since I clicked “install now” on step 11.

appreciate the advice.

Reply to  matt

It finally went to the next step but now I can’t type anything to fill in the spaces on step 12???????

any help?

Vedika Painjane
Vedika Painjane
Reply to  matt

I am also unable to type anything to fill the spaces on step 12. Did you get any solution?

Ann Cascarano
Ann Cascarano

I came across the same issue. I powered off the Ubuntu machine and allocated more Base memory in Virtual Box (Settings -> System -> MotherBoard) to 2048MB. Then I was able to type in the input fields.

Reply to  Ann Cascarano

Hey, thank you for the solution ! Finally got it working thanks to you.

Would love your thoughts, please comment.x