windows主机与虚拟机Linux共享文件夹

本文详细介绍了如何在VMware Player中安装VMware Tools,并通过共享文件夹实现Windows主机与Linux虚拟机之间的文件共享。首先通过【Virtual Machine】 > 【Install VMware Tools】挂载Tools,然后手动挂载CD-ROM,将tar.gz包复制并安装。安装过程中可能需要安装make、gcc和kernel headers。完成安装后,在虚拟机设置中启用共享文件夹,共享文件夹将出现在Linux系统的/mnt/hgfs/目录下。
摘要由CSDN通过智能技术生成

步骤:
1.VMware Player菜单选择【Virtual Machine】 > 【Install VMware Tools】,系统自动挂在VMWare Tools。

2.运行mount命令(不带任何参数),确定系统是否自动挂载VMware Tools virtual CD-ROM image

1 mount                      <==显示系统挂载情况

2.1如果系统没有自动挂载CD-ROM ,手动输入命令进行挂载:

1 mkdir /media/VMware Tools
2 mount /dev/cdrom  /media/VMware Tools

注:有些Linux系统挂在点为/mnt/cdrom,可以用ls命令查询该目录是否存在

3.把其中的tar.gz包复制到一个目录(/test/)

tar -zxvf VMwareTools-8.8.1-528969.tar.gz
./vmware-install.pl

4.一直按回车键,保留默认设置,安装成功。
——————————可能需要的步骤————————————————–

如果没有预先安装好make、gcc、kernel headers of the running kernelBefore you can compile modules, you need to have the following installed…

make
gcc
kernel headers of the running kernel
Searching for GCC…
The path “” is not valid path to the gcc binary.
Would you like to change it? [yes] yes
What is the location of the gcc program on your machine?cc
重新加载光盘,找到package目录里的rpm包,安装

rpm -ivh ***.rpm

在What is the location of the gcc program on your machine?后边输入/usr/bin/gcc,然后回车

6.根据提示,选择内核3.1.0-7.fc16.i686 kernel(或使用命令 ‘uname -r ‘查询内核版本)

Searching for a valid kernel header path...
The path "" is not a valid path to the 3.1.0-7.fc16.i686 kernel headers.
Would you like to change it? [yes] yes      

Enter the path to the kernel header files for the 3.1.0-7.fc16.i686 kernel?

安装rmp包
在Enter the path to the kernel header files for the 3.1.0-7.fc16.i686 kernel?
这一行后输入/usr/src/kernels/3.1.0-7.fc16.i686/include,回车。安装成功!

——————————可能需要的步骤————————————————–

至此,VMware Tools安装完成;

【虚拟机】->【设置】->【选项】->【共享文件夹】->【总是启用】->【添加】->【启用此共享】

启动虚拟机,共享文件夹被放在【/mnt/hgfs/】下

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值