在Win7 Host的ubuntu虚拟机中自动挂载win7的共享目录

1. 首先在虚拟机设置中配置需要共享的文件夹


2.进入虚拟机后做如下设置

yasin@yasin-v:~$ cat /etc/rc.local 

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

# YasinLee added the lines below
mount -t vboxsf D_DRIVE /home/yasin/D
mount -t vboxsf E_DRIVE /home/yasin/E

exit 0


yasin@yasin-v:~$ 

3. 重启虚拟机,完毕


Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐