您现在的位置是:首页 > 经验记录>服务器相关>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
随机推荐
- uniapp安卓打包使用及获取签名方法,自生成证书
- 开发 Composer 包详细步骤
- Laravel软删除操作以及回收站功能实现
- windows phpStudy ThinkPHP 5.1 Workerman 快速上手指南
- 如何在ubuntu上安装多个版本的php?并顺畅切换使用[其它系统类似原理]
- Js操作Select大全(取值、设置选中等等)
- 基于laravel6.2+laravel-permission扩展搭建的后台权限系统
- Python3搭建Django框架-转载
- ubuntu 下搭建redis和php的redis的拓展
- Laravel自带SMTP邮件组件实现发送邮件(QQ、163、企业邮箱都可)