Virtualbox command line sharing CentOS directory

  
 

1. Install the virtualbox enhancement tool "right ctrl+c" Show and hide the menu bar of the virtualbox virtual machine. In the VirtualBox menu, select "Devices" -> "Install Guest Additions" Create a mount directory: mkdir /mnt/zengqiang mount: mount /dev/cdrom /mnt /zengqiangcd /mnt/zenqiang./VBoxLinuxAdditions.run #Install the enhancement package or install /etc/init.d/vboxadd setup with the following command #Install the enhancement package

2. After setting the shared folder, click " Devices " -> The Shared Folders menu, add a shared folder, fixed and temporary options mean whether the folder is persistent. The share name can be taken at will, such as "yongfu", try to use the English name, no spaces.

3. Mount the shared folder in the command line terminal: mkdir /mnt/yongfumount -t vboxsf yongfu /mnt/yongfu

where "yongfu" is the previously created shared file The name of the folder. Now the virtual machine and the host can transfer files to each other. If you don't want to mount it manually every time, you can add a yongfu /mnt/yongfu vboxsf rw, gid=100, uid=1000, auto 0 0 in /etc/fstab so that it can be mounted automatically.

4. To uninstall, use the following command: umount -f /mnt/yongfu

Copyright © Windows knowledge All Rights Reserved