Share folders VirtualBox quick linux setup. Details admin Uncategorised 03 April 2013. Setup Shared folder. Before your start your guest operating system ( Ubuntu ) you need to change its settings. To be more exact we need to define share folder first. How to set up network file sharing on Windows 10. You can use more restrictive permissions, and you can share files with virtually any device, including Mac, Android, and Linux computers. In the case, you want stop sharing a folder you previously shared, right-click the folder.
- Setup Shared Folder For On Linux For Mac Clients
- Setup Shared Folder For On Linux For Mac Client Management
- Setup Shared Folder For On Linux For Mac Client Certificate
- Setup Shared Folder For On Linux For Mac Client League
- Setup Shared Folder For On Linux For Mac Client Download
Active5 years, 1 month ago
I want to mount a folder from a Linux machine on another Linux machine. How do I do that? Do I need to update
/etc/fstab
or /etc/export
?My target is to mount
/tmp
from the other Linux machine. I have Debian 5.1. 10.45.40.165
, that is the IP of the other machine.For example I tried:
slhck171k4949 gold badges476476 silver badges492492 bronze badges
David
migrated from serverfault.comJun 22 '11 at 14:39
This question came from our site for system and network administrators.
2 Answers
What you are doing is NFS share. On a Debian system you should install the tools necessary. Lets assume that the client (the machine on which you want to mount the remote folde) and server (the machine where remote folder is)
On server you'll need to install
in new debian versions
On the client you'll need to install:
My package selection could have more or less what you need but, some combinations will do.
Now what you need to do is put the folders you want to share with remote machine in /etc/exports:
Then:
Here 192.168.0.2 is the address of your local machine, replace that with your own IP. exports file has the list of machines that can access the shared folder.If your machines don't have firewall restrictions to each other (you can solve this by adding host to /etc/hosts.allow).
Now on your local machine you can use the command:
Barracuda vpn client for mac. If you want to have automatic mount on boot you need to edit your /etc/fstab file and put the line on your client:
This is just an example of settings (copy pased from my own), you need to check nfs help to see what suites you best.
enedeneenedene
In order to mount the folder /tmp from another machine, it has to be exposed by a service that allows that. Your question indicates that you intend to use NFS for this.
In this case, you will need to edit /etc/exports and provide a line in it similar to
Read the man page for exports for exact details of all the options. Once the options are what you need, restart the NFS service with
Then mount the exported folder from your client.
wolfgangszwolfgangsz
Active4 years, 3 months ago
votes
What is the procedure for mounting a VirtualBox shared folder in Linux?
I tried variations of the following mount command but I keep getting
protocol error
or other mount errors. BSalita
closed as off-topic by Michael Hampton♦May 11 '15 at 1:37
This question appears to be off-topic. The users who voted to close gave this specific reason:
- 'Questions on Server Fault must be about managing information technology systems in a business environment. Home and end-user computing questions may be asked on Super User, and questions about development, testing and development tools may be asked on Stack Overflow.' – Michael Hampton
locked by Michael Hampton♦May 11 '15 at 1:37
This question exists because it has historical significance, but it is not considered a good, on-topic question for this site so please do not use it as evidence that you can ask similar questions here. This question and its answers are frozen and cannot be changed. See the help center for guidance on writing a good question.
Read more about locked posts here.
8 Answers
votes
Setup Shared Folder For On Linux For Mac Clients
Ok this was a little confusing for me but I finally realized what was happening. So I decided to give my 2 cents in hopes that it will be more clear for others and if I forget sometime in the future : ).
I was not using the name of the share I created in the VM, instead I used share or vb_share when the name of my share was wd so this had me confused for a minute.
First add your share directory in the VM Box:
Whatever you name your share here will be the name you will need to use when mounting in the vm guest OS. i.e. I named mine 'wd' for my western digital passport drive.
Next on the the guset OS make a directory to use for your mount preferably in your home directory.
Next open the terminal and copy and paste the following or type it in. You can enable shared clipboard under Device-> Shared Clipboard-> Bidirectional
You should now be able to copy files between OS's using the folder 'share' in your home directory.
Hope this Helps!
Kyle CootsKyle Coots1,66533 gold badges1212 silver badges1414 bronze badges
votes
For VirtualBox with a Linux guest, these are the steps to mount a shared folder:
- Use the VirtualBox host's application, VirtualBox Manager, to specify host folders to share.
- Make sure VirtualBox Guest Additions are installed in the VirtualBox guest.
- In the Linux guest, the mount command should show a line that the share was mounted. This is indicated by
type vboxsf
. The issue becomes that the mount point may not be where desired, and the permissions are root only. The default mount location is in/media/sf_
. - You can access the share by making the user, or group id of
1000
, a member of groupvboxsf
. This is done by changing thevboxsf
line in the/etc/group
file. May require reboot. - You can change where the folder is mounted by using the VBoxControl command. The command is installed when Guest Additions is installed. May require reboot. For example, to change the mount point from
/media/sf_..
to/home/toto/sf_..
use the following command to set the VirtualBox shared folder guestproperty:
sudo VBoxControl guestproperty set /VirtualBox/GuestAdd/SharedFolders/MountDir /home/toto/
To confirm the change, use get:
References:
BSalita
votes
When encountering:
after trying to share folders in VirtualBox, eg:
this finally worked for me:
(My setup: Windows 7 host, guests: Ubuntu 12.04,13.10,14.04; currently running VBox 4.3.10 r93012)
Gerard
votes
Install virtual box additions on the guest os. Then shutdown the guest OS. Open the guestos settings in virtual box. Then add a shared folder and save the settings. Then start the guest os and for ubuntu issue the below command. It adds the current user to the vboxsf group.
sudo adduser $USER vboxsf
reboot the guest OS and navigate to /media/ to access the shared folder.
Jacob AbrahamJacob Abraham
votes
Inside a Linux or Mac OS X VirtualBox guest, once you have installed the VirtualBox Guest Additions, you can discover the available VirtualBox shared folders with following command :
If your home folder inside your guest contains folders having same name as VirtualBox shared folders, you can mount them automatically with following shell script :
Etienne URBAH
vote
When you get the following error:/sbin/mount.vboxsf: mounting failed with the error: Protocol error
Unfortunately this means that you use the default share name or host's share directory name is the same as the mounted guest share name. In this case it is 'share'. Just create another share folder, i.e. 'vb_share' and then just execute:
mount -t vboxsf vb_share /home/< user >/host
magiccraftermagiccrafter
vote
- Install Vbox Additions (ISO file or download then)
- Create a dir with whatever name in the two system (
mkdir share
, for example ) - connect with the 'VBox shared folders' the share folder in the original sys
- use the command to connect your folder:
sudo mount -t vboxsf name_of_folder_linked ~/name_of_folder_guest/
Luciano D'Alessandre
votes
Setup: VirtualBox 4.3.26, Win 7 SP1 host, Debian jessie 8.0 (stable) guest.
In VirtualBox Manager, select Shared Folders Settings.. in the Devices drop-down menu.
In the resulting pop-up window, select Machine Folders in the Folders List and then click the 'Add a New Shared Folder Definition' button (the blue folder with a green '+' sign icon to the right of the Folders List).
Setup Shared Folder For On Linux For Mac Client Management
In the resulting Add Share pop-up form, click on the down-arrow button in the Folder Path field, and then select Other. A Browse For Folder pop-up window will appear.
![Setup shared folder for on linux for mac client certificate Setup shared folder for on linux for mac client certificate](/uploads/1/2/6/8/126883149/955513424.png)
(In my case, I had just added another hard drive to my workstation to be used for a dedicated share, already formatted for NTFS, with a volume name of 'share', and mounted as 'G:'. So I clicked the arrow next to Computer, selected drive G: and then clicked the OK button.)
(In your case you should select whatever folder or drive you intend to share, then click the OK button.)
Setup Shared Folder For On Linux For Mac Client Certificate
When you've made your selection and clicked the OK button, VirtualBox Manager will fill in the Folder Path and Folder Name fields of the Add Share form. Leave the Folder Path field alone, but you can change the Folder Name if you like -- just be sure to remember it for later.
Finish up the Add Share form by selecting the Make Permanent check box, but be sure to leave the Auto-mount check box cleared -- we're going to take care of mounting later. (And of course, if you want to make the folder or drive read-only, then go ahead and check the Read-only box.) Then click the OK button.
The newly-configured share should now appear as an entry under Machine Folders in the Folders List. Click the OK button.
In order to mount this share during boot (startup) we need to add a mount definition line to /etc/fstab in our Debian jessie guest installation. This edit needs to be done either as root or via sudo, for example:
(I personally used vi, but because nano is the default editor on Debian jessie I specified it in the above example.)
To mount this share in my home directory, with its ownership and group set to my personal UID and GID, I added the following definition to /etc/fstab:
(Note that there are no spaces around the '=', '.', or ',' characters.)
An /etc/fstab definition is in the form
(Note that there should be whitespace -- space(s) and/or tab(s) -- between the fields of the definition, but no whitespace within a field.)
The 'Device' field should be set to the Folder Name we specified via VirtualBox Manager Add Share. I had changed the default 'G_DRIVE' to 'share'.
The 'Mount Point' is a directory path spec that must already exist but should be empty. (That is, anything already present in that directory will be hidden by what you're mounting on top of it.) I had created a new, empty subdirectory named 'share' in my home directory.
Setup Shared Folder For On Linux For Mac Client League
The 'Type' is 'vboxsf'.
Setup Shared Folder For On Linux For Mac Client Download
The 'Options' (comment=systemd.automount,uid=conib,gid=conib,noauto) were the tricky bit, and took a bit of trouble to get working for this setup.
Set 'Dump' to 0 unless you know you want it set to something else.
And since we don't want fsck checking this share, set 'Pass' to 0 too.
When you've added the definition line to /etc/fstab, reboot your Debian guest and confirm that you can see the files and subfolders of your Share.
HTH.
conibconib