win7 Host 與virtualbox 中的 ubuntu 11.04 共享文件夾

環境是: 主機是windows7,虛擬機是VirtualBox的ubuntu11.04java

 

 

1.開始安裝加強工具ubuntu

  首先要運行虛擬機上的ubuntu,點設備---》安裝加強功能。windows

 


 

以後會在桌面多出一個光盤圖標。app


 

[java]  view plain copy
  1. 接着啓動終端,輸入以下命令  
  2.   
  3. cd /media/VBOXADDITIONS_4.0.8_71778  
  4.   
  5. sudo ./VBoxLinuxAdditions.run  
  6.   
  7. 安裝完後,要重啓ubuntu.  
  8. 第一步End。  

 

   2.設置共享文件夾ide

 

    本例子以E://virtualShare爲共享文件夾工具

     首先在windows7中,要設這個文件夾爲能夠共享的,直接右鍵共享virtualShare就能夠了。this

    在你重啓完ubuntu後,再點選菜單的設備--->分配數據空間spa

 

 


 

再點右側的"加號"按鈕
.net


 

而後點先其它,再選擇剛剛你共享的那個文件夾,個人是virtualShare
orm



 第二步End

 

3.掛載共享文件夾

 

 

   進入終端:

[java]  view plain copy
  1. sudo mkdir /mnt/shared  
  2. sudo mount -t vboxsf virtualShare /mnt/shared  
  3.   
  4. OK,如今ubuntu能夠與windows7共享文件夾了,試下吧,哈哈  

   教程End.

 

---------------------------------------------------另有一英文教程,操做有所不一樣,沒有通過仔細驗證,互爲補充吧。可能須要重啓幾回才能成功,共享文件夾在../media/下。

Sometimes, you just have to move files from your VirtualBox’s Ubuntu 11.04 virtual machines to a Windows 7 host, but how?  It’s simple really!  There are couple ways of doing it, but I prefer to keep it simple.  The steps are below:

  1. Start VirtualBox
  2. Highlight a virtual machine in the list of virtual machines
  3. Click on Settings
  4. Go to Shared Folders
  5. Click on Add Shared Folders
  6. From drop down box of Folder Path, choose Other
  7. Pick a folder from your system that you have permission to access
  8. Check the box that says Auto mount
  9. Click OK button
  10. Click OK button again to save everything
  11. Start your Ubuntu 11.04 virtual machine (i.e., the one you have added a shared folder for)
  12. Inside Ubuntu 11.04 virtual machine, open up Control Center >> System >> Users and Groups
  13. Click on Manage Groups
  14. Scroll down till you see a group labeled as vboxsf, highlight it, and then click on Properties
  15. Place a check mark inside a box next to the user that you want to give access to shared folder(s)
  16. Click OK, and you have to enter your sudo’s password or root password or just a password of a user who has administrative authority
  17. Navigate to folder/directory labeled as media inside Ubuntu 11.04 virtual machine using either Nautilus or Terminal
  18. Change into the directory which begins with sf_, because a folder/directory inside media folder/directory that has sf_ prefix is a shared folder that you created earlier using VirtualBox.
  19. If using Nautilus, you can right click on empty space to create a folder with a folder name of your choosing.  If using Terminal, you can execute this command [mkdir Testing].  Remember, you should do this as a normal user, a user which you’d gave permission to access this shared folder a bit earlier using Ubuntu.  If you can create a test folder with a folder name of your choosing inside the directory with prefix sf_ in folder/directory media, it means you are officially able to transfer files and folders inside Ubuntu 11.04 virtual machine to your Windows 7 host.
  20. To double check to see if everything is working, navigate to your Windows 7 host and go to the shared folder that you’d allowed VirtualBox to share it with Ubuntu 11.04 virtual machine earlier.  If everything is working out, you should now see a test folder/directory you had created in step 19.

That’s it!  Have fun moving files from your Ubuntu 11.04 virtual machine(s) to your Windows 7 Host and vice versa!

相關文章
相關標籤/搜索