27 Apr 2020

Add Share Folder in VirtualBox

收藏到CSDN网摘
I have used VirtualBox for trying out linux client on my Win10 laptop. Sometimes, I do need share files between the host and client OS. The option looks straightforward. But it doesn't work like that. Here is the detailed steps.

1. make sure you install virtualbox guest addtions
2. close the client OS. Add the shraed folder in the Settings, note the 'folder name'. let's say it's called 'ShareFolder'
3. start the client OS, Open a terminal and run the following command
sudo mkdir /mnt/ShareTest
sudo mount -t vboxsf ShareFolder /mnt/ShareTest/
4. that's it. Your share files are there in the folder: /mnt/ShareTest.

Bingo! You have your shared folder now in the client OS. However, you need to remount it every time you restart the client OS even if you ticked the box saying 'auto mount'. Now, let's find the way of mounting the shared folder automatically!

5. edit your /etc/fstab file, add the following line then save the file.
ShareFolder /mnt/ShareTest vboxsf defaults 0 0

6. edit your /etc/modules file, add the following line then save it.
vboxsf

7. restart your client OS and you'll find it.

No comments :

Post a Comment