How the host shares files with the host when running Ubuntu using a virtual machine.

Source: Internet
Author: User

Brief introduction:

First set up the virtual machine: Network Adapter, Hardware settings, virtual machine, set to "Bridge: Connect directly to physical network" at the network connection, and "NAT: Use shared host IP address" tick.

Set up the Ubuntu network IP address again.

Ping test, see if you can ping, under "system-System Management" click "Network Tools"

If you can ping the pass, you can start the following steps.

Note that if you are using a proxy server, you also need to set up a proxy server, otherwise you will not be able to surf the Internet.

 

Method One: Mount by Mount

First create a folder under Ubuntu, and then create a folder and share it on this computer, and then hook it up in the Ubuntu terminal via the Mount command.

Such as:

Native ip:192.168.1.119
Native shared folders: share
Native User name: LXF
Native Password: 8

Ubuntu Hook-up folder:/home/lxf/ubuntu_share1

The Mount command is: Mount//192.168.1.119/share/home/lxf//ubuntu_share1-o username=lxf,password=8,dmask=777,fmask=777


You can also click "Location", select "Connect to Server", select Windows share in the server type, and set the server IP, and the name of the shared folder under Windows.

Click Connect to also mount Windows shared folders under Ubuntu.

However, this does not support automatic loading when Ubuntu starts, and it needs to be hooked up every time you start.

You can create a network disk under XP using Network Disk mapping in the following way

Method Two: Access Ubuntu shared folders through a network disk under Windows

1. Create a new folder in the virtual system Ubuntu, right click on the folder, select Properties, share, enable "Share this directory", and allow others to write data in this share .

Note: Samba support is required when sharing, the system prompts for installation, and after the installation is complete, you need to restart Ubuntu to take effect . When you return to XP, you can see a shared directory of * * * Desktop server (samba,ubuntu) in your network Neighborhood.

2. Return to the Windows XP system, right click on "My Network Places", select "Map Net Drive",

In "Browse" to find the folder you just shared under Ubuntu, choose to complete the mapping,

Turning on "My Computer" will find a "network drive", just like our hard drive.


At this point you can copy several files on the XP system to the corresponding network drive, then enter the Ubuntu system, you can see the files we just copied, of course, we can also put files in the Ubuntu shared folder, used in the XP system.

When creating a file share, note that the host network card must be open, or create a share is not successful, the way to open the network card is to connect the network cable to the route, do not let the network mouth empty.

Conclusion:

For me, I prefer the second way, because as long as Ubuntu starts, you can drop things in the Ubuntu shared folder under Windows, and do not need to do some repetitive operations every time you start.

How the host shares files with the host when running Ubuntu using a virtual machine.

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.