Sharing the Ubuntu guest file system with the macOS host

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
FernandoKC
Posts: 2
Joined: 5. Nov 2017, 23:03

Sharing the Ubuntu guest file system with the macOS host

Post by FernandoKC »

I have an Ubuntu server guest running on macOS High Sierra, and I'd like to access the Ubuntu file system from my Mac.

I tried the "Shared Folder" option, but it goes the wrong way (share macOS folders into Ubuntu), while I want the exact opposite.

Any suggestions?

Thanks!
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Sharing the Ubuntu guest file system with the macOS host

Post by Perryg »

Use a network share with either bridged or host-only.
FernandoKC
Posts: 2
Joined: 5. Nov 2017, 23:03

Re: Sharing the Ubuntu guest file system with the macOS host

Post by FernandoKC »

Could you elaborate please? O:-)
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Sharing the Ubuntu guest file system with the macOS host

Post by Perryg »

There's not a whole lot to elaborate on. You setup the host and guest to be able to talk to each other ( ping ) by using what I suggested above and then use a standard network share. Typically Linux would need to have samba and if memory serves my so would the Mac. Google Ubuntu on how to do this with the Ubuntu server and if you don't know how to do this on the Mac they have a forum as well.
Nap
Posts: 30
Joined: 22. Jul 2014, 02:06

Re: Sharing the Ubuntu guest file system with the macOS host

Post by Nap »

An option you might consider is to install FUSE for macOS from SourceForge, and then sshfs from github or Homebrew.
Then, you can mount the Ubuntu filesystem using something like: sshfs user@ubuntu.local:/ /mounts/ubuntu.
I have public key authentication on my VM, so I use a ~/.ssh/config entry instead of the user@machine syntax. You may need to use sudo, and there is an option, -o allow_other, which enables other users to see the mount, otherwise only the user who creates the mount will see it. Once mounted, you can browse/edit the file system through Finder, which does respect user permissions.
Post Reply