There are two methods
The first:
1. Open the virtual machine VMware Workstation, start the Ubuntu system, menu bar - virtual machine - install VMware Tools. You cannot click the "Install VMware Tools" option without starting the Ubuntu system, as shown below:
2. If the following box pops up, click Yes:
3. At this time, you will find that there is an item VMware Tools under the virtual machine device. Click it and there is a VMwareTools...tar.gz file in it:
Next, we extract the VMwareTools…tar.gz file to a directory, as shown below, to the newly created myfile directory on the desktop:
5. After the extraction is completed, you will find that there is an additional vmware-tools-distrib folder in myfile on the desktop. This is what we will need for installation later:
6. Next, we use the shortcut key Ctrl+Alt+T to start the command box, and then switch to the root user (the switching command is: sudo su, press Enter and you will be prompted to enter the password of the current logged-in user. After successful entry, you can enter the root user ):
7. Then we use the root user to enter the vmware-tools-distrib folder we just extracted, and then enter the command: ./vmware-install.pl, and then press Enter, as shown below:
8. After the above operation, the installation of VMware Tools will begin. Enter yes/no according to the prompts until Enjoy, –the VMware team appears as shown below, which means the installation is successful. Then manually restart the virtual machine:
9. After restarting the virtual machine, we found that the menu bar - Virtual Machine - Install VMware Tools changed to "Reinstall", which also indicates that VMware Tools has been installed successfully:
10. After installing VMware Tools, the virtual machine and host can transfer files to each other by "drag and drop":
The second method is to install directly in the terminal
First open the terminal
输入:sudo apt-get autoremove open-vm-tools
If the following problem occurs, it proves that your virtual machine already has the vmwaretools package, and the above steps are not required.
Directly enter: sudo apt-get install open-vm-tools-desktop
Just install it
If it is not the above problem, you need to enter two commands
1.sudo apt-get autoremove open-vm-tools
2.sudo apt-get install open-vm-tools-desktop