Ubuntu 在 Vmware Player中访问主机共享文件夹

首先,安装VMWare Tools,安装步骤参考官网的知识库(http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1022525)

这篇文章写的十分详细,如果可以访问youtube,还可以发现页面上有一个720p的教程视频,看不到视频也没关系,看文字说明也足够了.

摘抄安装步骤如下

Ubuntu or Ubuntu Server with a graphical user interface

To mount the CD image and extract the contents:

  1. Power on the virtual machine.
  2. Log in to the virtual machine using an account with administrator or root privileges.
  3. Select: For Fusion: Virtual Machine > Install VMware Tools.
    For Workstation: VM > Install VMware Tools.
    For Player: Player > Manage > Install VMware Tools.Note: If you are running the light version of Fusion, a version of Workstation without VMware Tools, or VMware Player, you are prompted to download VMware Tools before they can be installed. Click Download Now to begin the download.
  4. Open the VMware Tools CD mounted on the Ubuntu desktop.
  5. Right-click the file name that is similar to VMwareTools.x.x.x-xxxx.tar.gz, click Extract to, and select Ubuntu Desktop to save the extracted contents.The vmware-tools-distrib folder is extracted to the Ubuntu Desktop.

To install VMware Tools in Ubuntu:

  1. Open a Terminal window. For more information, see Opening a command or shell prompt (1003892).
  2. In the Terminal, run this command to navigate to the vmware-tools-distrib folder:cd Desktop/vmware-tools-distrib
  3. Run this command to install VMware Tools:sudo ./vmware-install.pl -dNote: The -d switch assumes that you want to accept the defaults. If you do not use -d, press Return to accept the defaults or supply your own answers.
  4. Enter your Ubuntu password.
  5. Restart the Ubuntu virtual machine after the VMware Tools installation completes.

第二步:安装好VMWare Tools之后,重启虚拟机.

在设置页面设置共享的文件夹,如图

ubuntu-folder-share

此处我设置共享名为share,这个名称之后会用到.

 

第三步:

在Ubuntu中打开文件夹 /mnt/hgfs,有的时候,这里面就已经出现共享的文件,但是据我亲测,我的是从来没有自动出现.那么就需要手动设置了

打开Terminal 终端,

输入以下指令


sudo mount -t vmhgfs .host:/share /mnt/hgfs

该语句是把share挂在到/mnt/hgfs目录下,据测试,被挂载的目录一定得是/mnt/hgfs, 少了hgfs也是不成功的.

重启虚拟机,应该就可以在虚拟机的/mnt/hgfs/share看到共享的主机上的文件了

 

 


原创文章,转载请注明: 转载自张哲的博客

本文链接地址: Ubuntu 在 Vmware Player中访问主机共享文件夹