How does one transfer files between linux and windows in vmware, vmwarelinux?

Source: Internet
Author: User

How does one transfer files between linux and windows in vmware, vmwarelinux?

We often encounter this kind of problem. If vmware of a higher version encounters a linux of a lower version, it is very tricky to use it. For example, a linux of a lower version is installed in vmware of a later version,

1. The virtual machine cannot be displayed in full screen.

2. Press Ctrl + Alt every time you switch out.

3. What is particularly hateful is that files cannot be directly transmitted to each other.

In view of the above situation, this blog is only aimed at the third issue. There are many methods to transfer files from linux in vmware to windows outside.

1. Create a shared directory

2. establish ftp, that is, use windows as the ftp server.

3. Create linux tftp, that is, use linux as a tftp server.

I have tried the above three methods, but I have not tried any other methods. I will not discuss them here for the time being.

Next I will talk about their respective advantages and disadvantages. The first method is to create a shared directory. I just tried it in fedora. This is done by watching the video. The video is operated through the graphic interface, however, creating a shared directory is only useful for this fedora. It is difficult for you to transplant it to another version of linux, of course, this is only for those who are not very good at my linux technology. So I gave up on this poor portability method. Such exceptions may occur in hosts files. I am not sure about the specific reason. It may be that ftp is a problem in windows. Haha. There is no problem in uploading files between windows.

To address the disadvantages of the above two methods, I strongly recommend one method, that is, the third method, to create a tftp server in linux, the process of creating this tftp server is not set through the linux graphical interface. Here we use command line settings. Why should we introduce this method, because setting portability with command line is better.

Step 1: first shut down your linux Firewall and SELinux. I will not introduce the commands here, just Baidu.

Step 2: first run the command line to check whether your ftp-server is installed. Run the command: rpm-qa | grep tftp-server.


This prompt is displayed if the installation is successful.

Step 3: If no installation is available, run the following two commands:

Yum install xinetd

Yum install tftp-server

Step 4: run the command to check whether the installation is successful. That is:

Rpm-qa | grep tftp-server

After successful execution, run the following command:

Vim/etc/xinetd. d/tftp


For example, if the modified file is in the server_args directory and specified in the/tftpboot directory, you must create a tftpboot directory in the root directory, you have decided which directory to put. The second location of the change is disable, which means "Can't you do it". Of course, you have to choose no, which means let him work. Save and exit. Also note that you should execute chmod 777/tftpboot to change the permission of the tftp directory.

Step 5: Execute two commands:

Service xinetd restart or execute

/Etc/init. d/xinitd restart

Run the following command: netstat-a | grep tftp to check the status of the tftp server:


Now that tftp has been configured for linux, We will test it on windows and on another linux machine:

Test on windows:

Make sure that the tftp client of windows has been opened. If you open the dos interface: If you enter the tftp Command, dos reminds you that tftp is not an internal or external command or a program that can be run ", now, configure a short configuration for windows: the configuration process is as follows: first enter the interface in the control panel, and then click "enable or disable the windows function". select the tftp client and click OK.





If you enter tftp in the dos interface, the following interface will appear: This indicates that the windows tftp client can be used.
How to use two Commands: the first is to download the file from the linux tftp server: Command: tftp 192.168.1.106 get B. c. Here 192.168.1.106 is the ip address of the linux server, and my windows ip address is 192.168.1.105 Upload Command: tftp 192.168.1.106 put B. c m. at the beginning of c, I thought this put Upload Command was very strange, but then I finally figured it out, B. c is a file under my windows directory C: \ Users \ Administrator. I want to upload it to the/tftpboot directory of linux, but why is there another main. c. If I do not have main in the/tftpboot directory of linux. c. paste the following command into the file:

Next, I will analyze the cause of the error, and enter tftp 192168.1.106 put B at a time. c, and the other input is tftp 192.168.1.106 put B. c m. the error messages of the two commands c are the same, but the commands are different, but the difference between the two commands is one m. in the c file, the error message is "server error: file not found". Let's take a look at the command input format of tftp under dos,


In the following example, uers19.txt is a file in vax1, so you can use the put command to transfer the file. Therefore, you should know how to change the previous error command, that is, run the command vim m in linux. c. Save and exit without writing anything. Then run the dos command: tftp 192.168.1.106 put B. c m. c. See run:




What's wrong? The system prompts "server error: Permission denied", which is m. c permission has been written, so you have chmod 777 m in linux. c:




This is a success. You can also check that the content of the m. c file in the directory of windows is the same as that in linux. This completes file copying...





Similarly, in another linux system, I can use the corresponding put and get commands to upload and download data to and from linux on the tftp server 192.168.1.106, however, if you want to upload an entire directory or download an entire directory, it will not work. Because everything in linux is a file, you can only upload or download one of the simplest files, do not include subdirectories, so to upload a whole project, you can first compress it with the tar command. Then, it is best to upload such files only between linux and a compressed file from linux to windows, it will always be a problem, so if you want to upload a compressed file, you should transfer the file in linux now. Maybe another linux you use can drag files directly to windows. Isn't that true. Although such a complete set is troublesome, it is feasible in a word.

Related Article

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.