





























ubuntu中检查有没安装openssh-server
sudo systemctl status ssh
sudo apt update
sudo apt install openssh-server
sudo systemctl status ssh
sudo apt install openssh-server && systemctl start ssh
有些ubuntu不自动挂载 /mnt/hgfs
VMware 已设置共享文件夹但 Ubuntu 下 /mnt/hgfs为空(或目录都不存在),通常是下面几个原因之一,按顺序排查基本能解决。
✅ VMware 中已勾选 "启用共享文件夹"
✅ 至少添加了一个共享目录
✅ Ubuntu 虚拟机正在运行
新 Ubuntu 推荐用 open-vm-tools(含 HGFS 支持)
dpkg -l | grep open-vm-tools
sudo apt update
sudo apt install open-vm-tools open-vm-tools-desktop
⚠️ 共享文件夹还需要内核模块支持,建议重启一次:
sudo reboot
ls -ld /mnt/hgfs
若不存在,手动建:
sudo mkdir -p /mnt/hgfs
VMware 不会自动挂载 HGFS,需手动或配置 fstab。
查看 VMware 识别到的共享名:
vmware-hgfsclient
如果能看到你设置的共享名(如
share),说明 HGFS 已识别 ✅
sudo mount -t fuse.vmhgfs-fuse .host:/ /mnt/hgfs -o allow_other
然后查看:
ls /mnt/hgfs
✅ 能看到共享目录即成功
编辑 fstab(谨慎):
sudo nano /etc/fstab
追加一行:
.host:/ /mnt/hgfs fuse.vmhgfs-fuse allow_other 0 0
保存后测试:
sudo mount -a
ls /mnt/hgfs
如
mount -a报错,先确认上一步手动挂载是成功的再保留 fstab 那行
Ubuntu 是用 "快速安装" 创建的?
有时要完全关机再重新开启共享文件夹
内核升级后未重启
uname -r
ls /lib/modules
VMware Workstation / Player 版本太老(少见)
/mnt/hgfs为空 99% 是因为没执行挂载或 open-vm-tools 不完整核心两条命令:
sudo apt install open-vm-tools open-vm-tools-desktop
sudo mount -t fuse.vmhgfs-fuse .host:/ /mnt/hgfs -o allow_other
上面这个挂载每次重启就没了, 可以修改/etc/fstab
sudo vim /etc/fstab
文件最后添加
.host:/ /mnt/hgfs fuse.vmhgfs-fuse defaults,allow_other 0 0
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。