How To Access Windows Host Shared Folders from Linux (Ubuntu) Guest OS Virtual Machine
After installing VirtualBox Guest Additions into Ubuntu (or any other Linux), one of the feature that available for communication between guest virtual machine and host operating system is shared folders. Shared folders allow folders or directories on the host machine to be mapped and access from within guest OS as a network share. By using shared folders, users can easily transfer and move files between guest and host OS.
Connecting to and accessing the shared folders from host operating system is slightly different in Ubuntu specifically and Linux generally when comparing with accessing VirtualBox Shared Folders from Windows guest. Here’s a guide on how to connect and access shared folders on a Windows host operating system from a Ubuntu Linux guest operating system in VirtualBox. Although the guide uses Ubuntu as an example, the same principle applies to most Linux flavors.
- If not installed yet, install VirtualBox Guest Additions into the Ubuntu virtual machine.
- At the VirtualBox window’s menu, go to Devices → Shared Folders. A “Shared Folders” dialog box will be shown.
- Click on the “Folder +” button to add a new shared folder.
- In the “Add Share” dialog box, enter the full path to the folder or directory on Windows host operating system that wants to be shared with guest operating system in Folder Path text box. Alternatively, click on the drop-down arrow and select Others to browse for folder.
Enter a descriptive name for the shared folder Folder Name. For user who browse for folder, a name is automatically entered based on selected folder, where user can alter the name if needed to. Do use a simple naming convention if it’s required to access the shared folder from guest OS in virtual machine.
Click OK when done. The shared folder(s) specification should be listed under root tree of “Transient Folders”.
Tip: Define as many shared folders as prefer by repeat the steps above. For users who want to grant only read-only access to the shared folders, tick the check box for Read-only. To make the shared folders permanent and available on every system restart, tick the check box for Make Permanent.
- Inside Ubuntu (or Linux) guest operating system, open a Terminal command-line session (from Applications -> Accessories).
- Create a directory in Linux as a mount point to reflect the shared folder in Windows host:
sudo mkdir /media/windows-shareThe directory name can be changed according to user preference, so do the path location for the mountpoint.
- Mount the shared folder with the following command:
sudo mount -t vboxsf <folder-name> /media/windows-shareChange the <folder-name> to the “Folder Name” assigned to the shared folder when defining the Shared Folders in VirtualBox. Similarly, if you use different mount point, change the mountpoint accordingly.
- The Windows folder(s) are now mapped to the mount point, i.e. /media/windows-share, and can be accessed from the mount point for all file and folder manipulation operation.
Tip: To automate the mounting process to the shared folders, user can use the /etc/init.d/rc.local script to execute these commands so that the shared folders are mounted available automatically every time the Ubuntu (and any Linux) is starting up in VirtualBox.
Related posts:
- Workaround to Access Shared Folders on Sun xVM VirtualBox from Windows 7 Guest
- How To Install VirtualBox Guest Additions in Linux (Ubuntu, Debian, Fedora, OpenSUSE, Red Hat and More)
- Unable to Connect to Internet in Virtual PC with NAT Shared Networking NAT on Windows XP Guest
- Download KB972435 Update to Fix Slow Shared Folders Access on Terminal Services Session or Windows XP Mode
- Try Out and Install Windows Vista in Virtual Machine with Virtual PC 2007 and VMWare Server





Thanks very much! It works perfectly!
My host system: Windows 7
guest system: Ubuntu
Hi! Thanks for the steps. I am totally new to linux and I wanted to try using VM. I have no problem mounting. But can you give an example how to use:
To automate the mounting process to the shared folders, user can use the /etc/init.d/rc.local script to execute these commands so that the shared folders are mounted available automatically every time the Ubuntu (and any Linux) is starting up in VirtualBox.s
Thanks!
John
Sorry again for three postings. Something is wrong on my side. Not to risk another wrong postig, i will leave it to you to figure it out from the two postings.
Apologies again.
Apologies, somehow, some lines in my previous posting were cut in falf. They should be as follows:
The line to be added to /etc/fstab:
folder-name /media/ vboxsf rw 0 0
Command to create a mounting point:
sudo mkdir /media/mount-point
Thanks for sharing this tip. I wanted to contribute an alternative solution:
In order to make it automount the shared folder, add the following line to /etc/fstab
/media/ vboxsf rw 0 0
Of course, firt, you have to create a mount point as follows
sudo mkdir /media/