Share folder between MacOS and Ubuntu

KKou
Mac O’Clock
Published in
3 min readJun 26, 2020

--

by Slawek Fedorczuk

This article provides the steps to share a folder on your Mac to Ubuntu through Virtualbox. It also discusses troubleshooting I encountered. Here we go!

  1. Launch Virtualbox
  2. Click your Ubuntu virtual machine > Settings > Shared Folders
  3. Click the “add new shared folder” button on the right side of the window
  4. Folder Path: click the drop-down arrow>other…>select the folder you want to share > open
  5. Folder Name: The folder name will be automatically updated once you choose the Folder Path
  6. Check “Auto-mount” > OK

For example, I choose to share a folder named “java” on my Mac Desktop:

7. Start Ubuntu virtual machine

8. Open terminal by right click on the desktop > Open in Terminal

9. Create a new folder you want to receive shared files or skip this step if you want to share to existing folder. For example, I created a folder in the Documents folder named “mac_shared” by type the following in the terminal (Note: “jk” is my user name, you should change to yours when you do this step):

mkdir /home/jk/Documents/mac_shared

10. Make sure you are on your home-directory in case you are not (for me, that is /home/jk) by typing

cd /home/jk

then use the following to mount your shared folder

sudo mount -t vboxsf java /home/jk/Documents/mac_shared

Enter your password if requested.

Note: java is the name of your shared folder from Mac; /home/jk/Documents/mac_shared is the directory of the folder on Ubuntu.

11. After all these steps you should be able to see files from Mac on Ubuntu

Let’s check

files on Mac
same files on Ubuntu

😎 Bravo!!

TroubleShooting

If you encountered the problem after entering “sudo mount -t vboxsf java /home/jk/Documents/mac_shared”:

mount: wrong fs type, bad option, bad superblock …. or helper program, or other error

solution

This problem happened on VirtualBox version 6.0.10. The problem should be solved after typing the following in Ubuntu’s terminal.

sudo dpkg --configure -a

sudo apt-get install virtualbox-guest-utils

😎

--

--