VBox Debian/Ubuntu - Automatically mount shared folder

خرید بک لینک

First make sure you've installed Guest Additions on your virtual machine. If you didn't see this. Go to Virtual Box, your virtual machine and click Settings.

enter image description here

Create a folder within host (using Windows 7) or choose one. Remember the Folder name we will use it when setting up our shared folder in guest (Debian / Ubuntu).

Wait! Auto-mount?

I see "Auto-mount" option there! This option will make your shared folder mounted automatically on guest boot. This is what we want! BUT.

Checking auto-mount will mount your shared folder into /media/<your folder name> in your guest.

TIP: Type df command into console to see where is your shared folder mounted.

If you are fully satisfied with this way. You're done. You don't have to read this post further.


Mount your shared folder into custom location. Such as www folder of your Apache or nginx web server etc.

Always rember to disable Auto-mount option in VBox settings. Do not forget.

enter image description here

Launch your virtual machine. Remember to create folder in guest before mounting.

Adding mount command into rc.local could cause problems. Better to not do it. Use fstab instead.

Add module

Go to sudo nano /etc/modules And add this to the end of the file

vboxsf
vboxvfs
vboxadd

Add command to fstab

Go to sudo nano /etc/fstab And add this line to the end of the file <your folder name> <your custom path to the folder> vboxsf default 0 0


Now you can reboot your virtual machine to see changes.

If you have any suggestions, please leave a comment or edit my answer!

- - , .
.

Recent Questions...

ما را در سایت Recent Questions دنبال می‌کنید

برچسب: نویسنده: استخدام کار بازدید: 316 تاريخ: سه شنبه 22 تير 1395 ساعت: 8:01

صفحه بندی