ubuntu 虚拟机实现自动挂载 Windows 下的目录

方法一, 修改 /etc/rc.local

在最后添加如下一行:

可以输入以下命令测试当前系统是否支持 vboxsf:

$ mount -t  // 然后按 tab 键,看是否有 vboxsf 选项

方法二, 修改 /etc/fstab

示例说明:

uw-share           /var/winwebroot      vboxsf         defaults          0            0<file system>       <mount point>       <type>         <options>      <dump>       <pass>实际分区名           挂载点              分区的文件       挂载的选项       dump备份设置   fsck磁盘检查设置OR                                     系统类型实际分区的卷标(Lable)

实例

实例一,修改 /etc/rc.local :

在这里插入代码片

实例二,修改 /etc/fstab :

# /etc/fstab: static file system information.## Use 'blkid' to print the universally unique identifier for a# device; this may be used with UUID= as a more robust way to name devices# that works even if disks are added and removed. See fstab(5).## <file system> <mount point> <type> <options> <dump> <pass># / was on /dev/sda1 during installationUUID=c95f93b0-e6a5-4538-9393-4f09e8795db4    /         ext4     errors=remount-ro    0   1# swap was on /dev/sda5 during installationUUID=ebccb983-7df2-45f0-b7dc-fdafda4f5d66    none    swap    sw         0    0## 添加如下一行,实现开机自动加载 uw-share     /var/winwebroot     vboxsf     rw,gid=110,uid=1100,auto    0    0

参考网址:https://www.cnblogs.com/TeyGao/p/5533147.html

(0)

相关推荐