File transfer between a Linux PC and a Linux virtual machine

Source: Internet
Author: User
Before reading this article, you can also refer to my previous article titled file transfer between a PC and a mac vm in iOS. 1. for VMTools installation, select the vmwareworkstation menu VM -- & gt; installVMWareto... before reading this article, you can also refer to my previous article titled file transfer between a PC and a mac vm in iOS.
 
I. VM Tools installation
Choose VM --> install vmware tools from the menu of VMWare workstation and execute the following command:
# Mkdir/mnt/cdrom
# Mount-o ro/dev/cdrom/mnt/cdrom (the vmtools installation file is placed in the vmware virtual cdrom. first, mount the optical drive to find the installation file)
# Cd/mnt/cdrom
# Tar-zxvf VMwareTools-xxx.tar.gz-C/tmp
# Cd/tmp/vmware-tools-distrib
#./Vmware-install.pl (run the vmware installation script, which is written in perl)
Some information will be asked during the installation process. Don't worry, just press Enter.
After the installation is successful, vmware adds a vmhgfs module to the kernel, as shown in the following figure:
# Lsmod | grep vmhgfs
If vmhgfs exists. The directory is used to share files between the virtual machine and the PC.
Vmhgfs is in the/mnt directory.

II. Virtual machine settings
Choose VM --> Setting --> Options --> Share Folders, select Always enabled in Folder sharing on the right, enable the shared Folder function, click add, and select the Folder shared by the host and the virtual machine, as shown in:
 
Virtual machine settings

3. share files
Place the file that needs to be shared to Linux on the PC to D: \ mac, and then execute the following command in Linux:
# Cd/mnt
You can see the mac folder, so the files under D: \ mac are naturally under this folder.
The job is closed.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.