Shared file settings between Linux virtual machines and hosts in VirtualBox

Source: Internet
Author: User

Set shared file path Click Virtual machine settings-Select shared Folder

(Figure 1 Setting up a shared folder)

Set the shared folder path
    • 1 Select Path
    • 2 fill in the Custom share name (you need to correspond to the Mount Path later)
    • 3 Setting up automatic mount/fixed assignment

(Figure 2 Setting the shared File path property)

Install the VirtualBox Enhancement tool to install the required packages first

Execute the following command:

install -y gcc gcc-devel gcc-c++ gcc-c++-devel make kernel kernel-devel

After the installation is complete, restart the virtual machine:

shutdown -r now
Installing the VirtualBox enhancement tool

Click Settings-click Install enhancements ...

(Figure 3 Click Settings)

Automate installation or go to directory/media/vboxadditions_5.1.2_108956, execute commands

./VBoxLinuxAddtion.run

Get output content

[[Email protected]Vboxadditions_5.1.2_108956]#./Vboxlinuxadditions.runVerifying Archive Integrity ...All good.UncompressingVirtualBox5.1.2GuestAdditions forLinux...........VirtualBoxGuestAdditions InstallerRemoving installed version5.1.2 ofVirtualBoxGuestAdditions...vboxadd.sh:StoppingVirtualBoxAdditions.vboxadd-service.sh:StoppingVirtualBoxGuest addition service.  Copying Additional installer modules ... installing additional modules ... vboxadd.sh: Building Guest Additions kernel modules.vboxadd.sh:  Should restart your guest to make sure the new modules is actually used.vboxadd.sh: starting the VirtualBox C10>guest additions.  Need to restart the Windows System (or just restart the guest system) to enable the guest Ad Ditions.               

Installation is successful!

Mount Shared Folders

Switch to the root user input mount command:

/home/xingoo/shared

Note the format is

sudo mount -t vboxsf 共享文件夹名称(在设置页面设置的) 挂载的目录

Then go into the/home/xingoo/shared and you'll see the files in Windows

(Figure 4 Windows files)

[Email protected] shared]#lltotal 337516-rwxrwxrwx. 1 root root 149599799 Aug 15 21< Span class= "Hljs-selector-pseudo" >:29 apache-hive-2 .1.0-bin . Tar.gz-rwxrwxrwx. 1 root root 196015975 aug 21:31  Hadoop-2.6.4 .tar.gz       
Other use Tips

If the host is a copy of the content that Windows often needs to go back and forth, you can open the shared clipboard by:

设备-->共享粘贴板-->双向

Shared file settings between Linux virtual machines and hosts in VirtualBox

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.