Preface
This document will demonstrate the installation of VMware Tool and networking in NAT mode.
The document is divided into the following three parts:
- 1. Why should you install VMware Tool?
- 2. VMware Tool installation steps
- 3. Access the Internet in Ubuntu
text
1. Why should you install VMware Tools?
- File sharing between the host and the virtual machine can be realized, and free drag and drop is supported.
- The mouse can move freely between the virtual machine and the host
- Copied content can be pasted directly.
2. VMware Tools installation steps
-
Directly click Install VMware Tools in the virtual machine in the upper left corner .
-
After performing the previous step, this pop-up window will pop up, click Yes .
-
After waiting for a while, a page like this will pop up in the virtual machine. We copy the VMwareTools-10.3.22-15902021.tar.gz inside to the desktop (if it does not appear, you can eject the cd in the document and execute it again. steps above).
-
We use CTRL+ALT+T to open the terminal.
Use command
sudo passwd
to set the root user's password. First enter the virtual machine user password, and then enter the set root user password twice.
Let’s modify the username and use
su root
Command to enter root mode, enter the password you just set, and you can enter the root user. Then we use
gedit /etc/hostname
Modify the hostname
and use
reboot
The command can be used to restart the computer (the operation of changing the host name requires restarting the computer to take effect).
Add a command
hostname k
bash
k is the name of the host name we want to change.
The host name can be modified temporarily (it will become invalid after restarting).
- We enter the desktop folder, check whether there are copied files, and then decompress it.
The commands used are:
cd 桌面
ls
tar -zxvf VMwareTools-10.3.22-15902021.tar.gz
- After correct decompression, it should be as shown in the figure below. Use the ls command to view the file, enter the decompressed file, then use ls to view the file, and use
./vmware-install.pl
To install
After installing the command, we will first be asked to choose, as shown below, enter y, and then press Enter.
Notice. Don't press Enter directly here.
Then it will also ask us some content, and just press Enter for the rest. Until the following picture appears, VMware Tools is successfully installed.
- This is the same as changing the user name. It will take effect only after restarting, so let’s review the command again.
reboot
At this time our VMware Tools can be used.
At this point we can turn off the free stretch button, and you can see that the desktop still covers the entire page, which means that VMware Tools can be used normally.
- We delete the two files remaining after the installation of the desktop and use the command
rm -rf 文件名
This command can delete even the contents of the folder.
So don’t delete the desktop folder directly to save trouble, otherwise you will see a bunch of folders on the desktop next time you turn on the computer.
3. Access the Internet in Ubuntu
Accessing the Internet is an essential issue. For the NAT mode we set up at the beginning, we can operate it directly on the host. NAT mode is also enough for us to use. It is worth noting that NAT mode uses a virtual switch to share the network between the virtual machine and the host, so they are not on the same network segment. I will publish the differences between the three network modes later.
Steps:
1. Select the network we are using in the host 's network adapter . Right-click -> Properties -> Sharing, check Allow other network users to connect through this computer's Internet connection , and then select a private network connection in the network connections below . Be sure to choose VMware Network Adapter VMnet8 , which is a NAT mode connection.
- At this time, we enter in the browser of the virtual machine
www.baidu.com
You can open the Baidu page. At
this point, this document ends.