栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

VMware下ubuntu虚拟机和windows创建共享文件夹

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

VMware下ubuntu虚拟机和windows创建共享文件夹

一、在虚拟机设置要共享的windows文件夹
  • 启动虚拟机
  • 选择菜单栏中的虚拟机
  • 选择设置中的选项
  • 设置共享文件夹
二、在ubuntu中进行设置

1、查看共享文件夹是否设置成功:

vmware-hgfsclient

若成功则会显示在windows下共享文件夹的名称
2、若失败
在一中设置之后,在命令行执行以下代码

//如果之前没有命令包则先执行sudo apt-get install open-vm-tools
//更改账户的权限,只有在输入账户的密码之后才能够查看到.即执行
sudo vmhgfs-fuse .host:/ /mnt/hgfs -o nonempty -o allow_other

设置完成之后在**/mnt/hgfs**查看共享文件夹

sky@ubuntu:~$ sudo apt-get install open-vm-tools
[sudo] password for sky: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
open-vm-tools is already the newest version (2:11.3.0-2ubuntu0~ubuntu20.04.2).
The following packages were automatically installed and are no longer required:
  libfwupdplugin1 linux-headers-5.13.0-39-generic linux-hwe-5.13-headers-5.13.0-39 linux-image-5.13.0-39-generic linux-modules-5.13.0-39-generic
  linux-modules-extra-5.13.0-39-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 29 not upgraded.
sky@ubuntu:~$ sudo vmhgfs-fuse .host:/ /mnt/hgfs -o nonempty -o allow_other
sky@ubuntu:~$ cd /mnt/hgfs/ && ls
vmshare
sky@ubuntu:/mnt/hgfs$ 

之后就可以在windows和ubuntu之间共享文件

sky@ubuntu:~$ cp workspace/test/a.c /mnt/hgfs/vmshare/
sky@ubuntu:~$ ls /mnt/hgfs/vmshare/
a.c  c_glib.rar
sky@ubuntu:~$
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/883718.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号