Friday, April 5, 2013

Virtual Box : Accessing shared folders in Linux guests

In the last post I mentioned about sharing host folders with the guests. Today we shall see how to access shared folders in Linux guests.

If  Auto mount option was enabled while sharing the folder, it will be automatically mounted to a folder in /media. Folder name will be the sharename which you gave at the time of sharing prefixed with "sf_".

For example if you shared a folder with sharename 'testfolder'. Then it will be mounted at /media/sf_testfolder.

If auto mount option was disabled during sharing, you will have to manually mount it. Use the following command

mount -t vboxsf [-o OPTIONS] sharename mountpoint

For example if you shared a folder with sharename testfolder, you can mount it as follows

sudo mount -t vboxsf testfolder /home/anil/shared

Thus the shared folder will be mounted in the directory /home/anil/shared

Another method to automate the above task is to edit the /etc/fstab to mount the shared folder. In our above example add the following line to fstab.

testfolder  /home/anil/shared vboxsf defaults 0 0

Click here to know more about configuring fstab in ubuntu.  

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | coupon codes