Linux file sharing (two methods)

1. Purpose of the experiment

Become proficient in two methods of Linux file sharing (shared folders). One is to map the shared folder of the virtual machine ubuntu under /mnt/hgfs to the physical machine, and the other is to connect the shared folder of the virtual machine ubuntu through the mapped network drive of the physical machine.

2. Experimental environment

Tool software: VMware

Experiment preparation: physical machine Windows 10, virtual machine ubuntu 14.04.6

3. Experimental content (experimental steps, test data, etc.)

Install VMtools in the virtual machine ubuntu 14.04.6:

VMtools installed successfully

Linux file sharing (shared folder) method one:

In the virtual machine settings, click Options, Shared Folders, set it to always enable in Folder Sharing , add the name and host path in the folder

The name is the name of the self-set shared folder, and the host path is the path of the shared folder on the physical machine

The name I set is ubuntu_share, and the host path is E:\ubuntu_share

promote free

ctrl+alt+T to open the terminal, enter: sudo -i, enter the password, enter root mode

输入:apt-get install open -vm -tools

 If there is no hgfs folder under /mnt, you need to create it manually. Type: mkdir /mnt/hgfs

 Enter: vmhgfs-fuse.host://mnt/hgfs

Enter: ls /mnt, check if the hgfs folder exists

Enter: cd /mnt/hgfs, enter the hgfs folder

Enter: ls to see if there is a shared folder in hgfs

There is a shared folder, created successfully

Next, verify whether the file is shared successfully by creating the file in the physical machine and then observing whether the file exists in the virtual machine

Go back to the physical machine, enter the host path E:\ubuntu_share, and create a 11.txt text file

back to ubuntu

Enter: cd ubuntu_share, enter the shared folder

Enter: ls to view the files under the shared folder

11. The txt file exists and the file sharing is successful

Linux file sharing (shared folder) method two:

Enter in the cmd of Windows 10 on the physical machine: ipconfig to view the ip address

Enter in the terminal of the virtual machine ubuntu: ifconfig to view the ip address

 Ping each other to ensure the network connectivity between the physical machine and ubuntu

create folder in ubuntu

 Right-click in turn, properties, local network share, check share this directory and two allow, click create share

Go back to the physical machine, go to Network on the desktop or go to This PC on the desktop

Find the network, right-click and select Map Network Drive

If there is a prompt to enable network discovery, click OK, ignore it

Go to Map Network Drive

Enter: \\ubuntu\11, specify the network folder to connect

"ubuntu" is the name of the virtual machine, and "11" is the name of the shared folder just set in ubuntu

Click Finish to connect to ubuntu's shared folder by mapping a network drive 11

Next, verify whether the file is shared successfully by creating the file in the physical machine and then observing whether the file exists in the virtual machine

Create a 11.txt text file in the shared folder 11

Back to ubuntu, enter the shared folder 11

11. The txt file exists and the file sharing is successful

4. Experimental experience

Familiar with the two methods of linux file sharing (shared folder).

Guess you like

Origin blog.csdn.net/m0_59302403/article/details/130019891
Recommended