virtualbox设置共享文件夹自启动

1:先在virtualbox的设置中设置我们要共享的文件夹

2:在ubuntu中执行sudo gedit /etc/rc.local

如下图

RCAR_input为我们要共享的主机文件夹,mnt为虚拟机要挂载共享文件夹的位置
 1 #!/bin/sh -e
 2 #
 3 # rc.local
 4 #
 5 # This script is executed at the end of each multiuser runlevel.
 6 # Make sure that the script will "exit 0" on success or any other
 7 # value on error.
 8 #
 9 # In order to enable or disable this script just change the execution
10 # bits.
11 #
12 # By default this script does nothing.
13 
14 mount -t vboxsf RCAR_input /mnt
15 
16 exit 0
原文地址:https://www.cnblogs.com/zongfanstudy/p/12806821.html