virtualbox下ubuntu共享文件夹自动挂载
来源:互联网 发布:我的阿里云tv工程模式 编辑:程序博客网 时间:2024/04/29 18:22
1.若想删除挂载,可执行命令
umount -f /mnt/share2.若想开机自动挂载,可以在 /etc/fstab 文件末添加一项sharing /mnt/share vboxsf defaults 0 0或sharing /mnt/share vboxsf rw,gid=100,uid=1000,auto 0 03.为了方便,可以在桌面上新建一个文件,内容为:
#!/bin/sh sudo mount -t vboxsf sharing /mnt/share
以上资料是从网上摘录的,对于“开机自动挂载”模块,我试了好多遍都以失败告终,大部分网络资料都是说在 /etc/fstab 文件中追加 VirtualBox虚拟机文件夹共享挂载命令 “ sharing /mnt/share vboxsf defaults 0 0 ”,其实是错误的,因为系统调用fstab的时候,Virtualbox的共享目录的模块还没有加载,所以每次加载都会失败,最终的解决方案如下:在文件 /etc/rc.local 中(用root用户)追加如下命令
mount -t vboxsf sharing /mnt/share
最后重启系统,大功告成!!!
另外,在 VirtualBox 4.x 版本中,已有一个“自动挂载”功能,如下图所示:
再使用命令 mount ,得如下挂载信息:
[jianbao@localhost ~]$ mount
/dev/sda1 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw,rootcontext="system_u:object_r:tmpfs_t:s0")
/dev/sda2 on /home type ext3 (rw)
sharing on /mnt/share type vboxsf (uid=1000,gid=100,rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
htdocs on /media/sf_htdocs type vboxsf (gid=501,rw)
sharing on /media/sf_sharing type vboxsf (gid=501,rw)
/dev/sda1 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw,rootcontext="system_u:object_r:tmpfs_t:s0")
/dev/sda2 on /home type ext3 (rw)
sharing on /mnt/share type vboxsf (uid=1000,gid=100,rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
htdocs on /media/sf_htdocs type vboxsf (gid=501,rw)
sharing on /media/sf_sharing type vboxsf (gid=501,rw)
它自动把这些共享文件夹挂载到 /media/ ,目录下了,我想要说的是,这个挂载目录不是我想要的,
所以我没采用VirtualBox的自动挂载功能(因为挂载目录自己不可控)。
0 0
- virtualbox下ubuntu共享文件夹自动挂载
- VirtualBox ubuntu 自动挂载共享文件夹
- Virtualbox虚拟机Ubuntu共享文件夹设置 自动挂载
- Virtualbox虚拟机Ubuntu共享文件夹设置 自动挂载
- Virtualbox虚拟机Ubuntu共享文件夹设置 自动挂载
- Virtualbox虚拟机Ubuntu共享文件夹设置 自动挂载
- Virtualbox虚拟机Ubuntu共享文件夹设置 自动挂载
- Virtualbox虚拟机Ubuntu共享文件夹设置 自动挂载
- virtualbox安装ubuntu后共享文件夹自动挂载问题
- VirtualBox下设置共享文件夹并自动挂载
- VirtualBox 开机自动挂载共享文件夹
- VirtualBox中Ubuntu挂载共享文件夹
- virtualbox下centos挂载共享文件夹
- 分享Virtualbox Ubuntu 共享文件夹、自动挂载的一些问题
- VirtualBox虚拟机 Ubuntu 16.04.3 LTS 安装增强功能,共享文件夹,开机自动挂载
- virtualbox下ubuntu加载共享文件夹
- virtualbox下ubuntu访问主机共享文件夹
- 下Virtualbox虚拟Ubuntu共享文件夹设置
- physcial standby database (主-从-从)
- linux系统初次使用cmake编译boost项目
- Lock与synchronized是不一样的
- mysql备份还原(视图、存储过程)
- OC中的内存管理
- virtualbox下ubuntu共享文件夹自动挂载
- 【jQuery】Ajax函数:$.get(),$.post(),$.ajax(),$.getJSON()
- maven项目中自动下载jar包的pom.xml配置
- android:layout_width与android:width的区别
- LeetCode 102 : Binary Tree Level Order Traversal(Java)
- NStimer(计时器)实现按钮的发送验证码的一个小demo
- 新手学EasyUI(八)----SubGrid三级嵌套
- 自适应增益AGC算法
- 王学岗的属性动画上(二)——objectAnimator的非主流用法