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

VMware下ubuntu虚拟机和windows创建共享文件夹,第1张

一、在虚拟机设置要共享的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:~$

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/yw/927195.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-17
下一篇2022-05-17

发表评论

登录后才能评论

评论列表(0条)

    保存