您现在的位置是:首页 > 经验记录>服务器相关>linux(ubuntu18.04)虚拟机目录挂载映射到windows目录 网站首页 服务器相关
linux(ubuntu18.04)虚拟机目录挂载映射到windows目录
1,在vmware中设置windows共享目录 F:\html
2,在ubuntu中安装open-vm-tools
apt-get install open-vm-tools open-vm-tools-desktop
3,在ubuntu中用vmtools挂载共享目录
[root@ubuntu~]# vmware-hgfsclient //查看共享的目录
html
[root@ubuntu~]#
vmhgfs-fuse .host:/ /var/www -o nonempty -o allow_other
挂载目录
[root@ubuntu~]# ls /var/www/
html
[root@fedora ~]# ls /var/www/html
4,上面的设置让F:\html = /var/www/html;
5,在windows F:\html 新增文件, /var/www/html会出现
备注:
我用mount挂载行不通,一直报错:Error: cannot mount filesystem: No such device
这里安装一下:sudo apt-get install open-vm-tools-dkms
然后命令:sudo vmhgfs-fuse .host:/ /mnt/hgfs -o allow_other
记住,一定要加allow_other选项,不然之后的hgfs文件普通用户不能访问
如果之前没有加-o allow_other,已经使得文件hgfs在普通用户环境下不可访问,也就是提示了
fuse: mountpoint is not empty
fuse: if you are sure this is safe, use the ‘nonempty’ mount option
可将nonempty选项加到里面去
sudo vmhgfs-fuse .host:/ /mnt/hgfs -o nonempty -o allow_other
随机推荐
- 在 Laravel 中使用 基于Workerman 的Gateway-worker进行 socket 长连接通讯
- 近50道家常菜做法
- ceph-对象存储接入S3 API
- laravel redis 操作命令集
- Golang获取命令行参数(通过命令行指定参数控制程序运行)
- 使用ceph-deploy 2.0.0 部署ceph 12.2.5集群
- 在阿里云ECS服务器Ubuntu16.04LTS上部署apache2+php+mysql环境
- Laravel框架下,页面(包含大量echarts图表)html导出为PDF实现,可批量.
- GitHub release文件被墙下载失败问题-转载
- Git如何初始化本地已有项目






