Win11安装VMware虚拟机共享磁盘到Debian13
之前写过一篇的,只是当时是win10+centos,地址:https://www.keinx.com/linux/win-vm-linux.html
这次是win11+debian13
首先安装好VM虚拟机,在虚拟机中安装好debian13系统。
在虚拟机设置 -> 选项 -> 共享文件夹 -> 总是启用 -> 添加文件夹(主机路径在这里我选择的E:\Code、名称设置的code,开启已启用,关闭只读)。
# 先运行,安装vm tools
apt update
apt install open-vm-tools -y
# 运行 hgfs 看看是不是有code输出
vmware-hgfsclient
# 然后创建挂载目录,执行挂载
mount -t fuse.vmhgfs-fuse .host:/code /www -o allow_other,uid=1001,gid=1001
# 设置开机启动自动挂载
nano /etc/fstab
.host:/code /www/wwwroot fuse.vmhgfs-fuse allow_other,uid=1001,gid=1001,defaults 0 0