When we work with virtual machines created by virtualization software like VirtualBox, VMWare Workstation,.. we often need a shared folder between host machine and guest machine in order to share software, documents… In this article, I’d like to share how to share files and folders (directories) between host and guest I have done on my PCs. The host is Window 8, the guest is Ubuntu 14.0.4 and virtualization software is VirtualBox.
The main steps includes:
- Install VirtualBox Guest Additions
- Create shared folder on host machine
- Create mount folder on guest machine
- Execute command
1. Install VirtualBox Guest Additions
one way is:
1 |
sudo apt-get install virtualbox-guest-additions-iso |
2. Create a shared folder on host machine
- Create a folder on the Host computer (ubuntu) that you would like to share, for example ~/share
- Boot the Guest operating system in VirtualBox.
- Select Devices -> Shared Folders…
- Choose the ‘Add’ button.
Select ~/share - Optionally select the ‘Make permanent’ option
3. Create mount folder on guest machine
1 |
mkdir ~/shared |
1 |
sudo mount -t vboxsf -o uid=$UID,gid=$(id -g) share ~/share |