解決vmware上ubuntu無法共享檔案夾問題(ubuntu22.04)
第一步:設定共享檔案夾
第二步:安裝open-vm-tools
1 sudo apt install open-vm-tools*
第三步:掛載檔案夾
-
先查看設定的檔案夾有沒有起效
1 vmware-hgfsclient
如果出現有掛載對應的檔案夾就起效
-
創建目錄并掛載
1 sudo mkdir /mnt/hgfs
-
手動掛載/自動掛載
手動掛載方法
但是每次重啟都得掛載一遍,比較麻煩
1 sudo vmhgfs-fuse .host:/VMshare /mnt/hgfs
自動掛載方法
1 sudo cp /etc/fstab /etc/fstab.bak
2 sudo vim /etc/fstab
在最后一行插入這樣一句
1 .host:/VMshare /mnt/hgfs fuse.vmhgfs-fuse allow_other,defaults 0 0
VMshare是自己設定的檔案夾名稱,/mnt/hgfs掛載點,fuse.vmhgfs-fuse掛載方法
最后保存退出(先別走!)
由于配置自動掛載檔案容易配置錯誤導致系統進入emergency mode,最好要備份好fstab檔案,并且做好虛擬機快照,或者搜索在emergency mode的恢復方法
然后cd到/mnt/hgfs里就能看到共享的檔案了,有可能需要管理員權限
如果你在此之前安裝過官方的vmtool或者舊版本的open-vm-tools最好先卸載干凈
1 sudo vmware-uninstall-tools.pl
2 sudo apt-get remove open-vm-tools
3 sudo apt-get remove --auto-remove open-vm-tools
4 sudo apt-get purge open-vm-tools
5 sudo apt-get purge --auto-remove open-vm-tools
參考參考:
https://www.cnblogs.com/nanopeng/p/7017351.html
https://blog.csdn.net/weixin_43445661/article/details/109497763
https://blog.csdn.net/weixin_44565095/article/details/95937794
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/498578.html
標籤:其他
