環境:
VMware Workstation 11.0
虛擬機中的系統:Ubuntu 16.04
物理機:window 7
安裝好vmware tools后在 /mnt/hgfs 里沒有東西,是空白的!
解決辦法:
安裝open-vm-tools
sudo apt-get install open-vm-tools
然后一路按回車。
安裝好后可以使用vmhgfs-fuse命令,比如在虛擬機里有個目錄 ~/share,終端中切換到家目錄,然后:
vmhgfs-fuse share
這樣就把windows里的目錄共享到了ubuntu里了。當然前提是在虛擬機設置里已經設置好了共享文件夾。
如果要在開機是自動掛載共享文件夾,則需更改/etc/fstab文件。打開文件后在最后添加:
.host:/ /mnt/hgfs fuse.vmhgfs-fuse allow_other,defaults 0 0
在debian jessie中的方法不一樣!
sudo apt-get install open-vm-tools sudo apt-get install open-vm-tools-desktop
安裝完這2個后,在終端中使用 vmhgfs-fuse不管用:
vmhgfs-fuse
bash: vmhgfs-fuse: command not found
掛載有個提示,但是實際上可以掛載:
sudo mount -t vmhgfs .host:/ /mnt/hgfs Could not add entry to mtab, continuing
設置為開機掛載:
.host:/ /mnt/hgfs vmhgfs defaults 0 0
-- END --