In this tutorial we will see how to share files and folders between Windows 7 and vitrualized Ubuntu. That means Ubuntu is installed in VirtualBox under the Windows 7 operating system. The Windows 7 OS here is the host while Ubuntu is the guest.
This tutorial will be done using:
- Windows 7 ---> Installed on a physical machine
- Ubuntu 11.10 ---> Installed using VirtualBox (also applicable on Ubuntu 12.04/11.04)
- Under Windows 7, open Network and Sharing Center and click "Change advanced sharing settings," then make sure that the "Password protected sharing" option is turned off:
- Make sure also in the same window that the "Network Discovery" option is well enabled, then save your changes.
- Start now VirtualBox, right-click on the Ubuntu virtual machine and select Settings:
- Open the Network tab and select "Attached to: Bridged Adapter," then click OK:
2. Configuring Ubuntu
- Start now Ubuntu using VirtualBox and right-click on the folder you want to share and select "Sharing Options":
- You will be prompted to install sharing packages (SAMBA), after installing them, your shared folders will begin to appear in both Windows 7 and Ubuntu:
Run also this additional command to set password for SAMBA (replace username with your own username):
sudo smbpasswd -a username
To check the status of file sharing under Ubuntu, run this command:
service smbd status
If enabled, you will get these outputs:
If you receive this:
Then file sharing is disabled and can be enabled with the following command:
sudo service smbd start
Note: This tutorial may work with other virtualized Linux-based distributions (Debian, Linux Mint, etc.) provided that the Bridged Adapter option is well selected.