参考链接:
共享文件夹设置:https://blog.csdn.net/skylake_/article/details/53132499
共享文件夹错误解决:https://blog.csdn.net/sbqakqux/article/details/32332449
屏幕设置ttps://blog.csdn.net/mahushen/article/details/30478107
1. 修改virtualbox虚拟机的屏幕显示
安装增强功能:
在打开虚拟机,并允许linux系统后后,点击virtualbox的的设备-》安装增强功能,在ubuntu系统中会出现一个弹框,点击run,输入密码后等待安装完毕。重启虚拟机系统即可。
设置文件夹共享要求先安装增强功能。
2. 设置粘贴板共享:
在配置好虚拟机的页面中,点击设置-》常规-》高级,将共享粘贴板和拖放两个都选为双向。
3. 设置虚拟机界面的共享文件夹
在打开的设置界面中,点击共享文件夹-》在共享文件夹路径中选择好路径,在自动挂载和固定分配处打上勾。然后确定就行。
4. Linux建立共享文件夹
在虚拟机linux系统里面,系统目录mnt下建立share文件夹,sudo mkdir /mnt/share
接着运行挂载命令:
mount -t vboxsf share /mnt/share
其中,-t表示普通挂载,share是Virtualbox设置中共享文件夹名字,/mnt/share是在虚拟机中linux内的共享文件夹路径。
如果运行没有错误则挂载成功,可以在share中看到共享文件
5. 错误解决:
如果出现下面错误:
mount: wrong fs type, bad option, bad superblock on E_DRIVE,
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might
need a /sbin/mount.<type> helper program)
In some cases useful info is found in syslog - try
dmesg | tail or so
则可以参考第二个网址(共享文件夹错误解决)进行修复:
a.在ubuntu终端中输入ls -al /sbin/mount.vboxsf,查看mount.vboxsf的链接文件
会发现/sbin/mount.vboxsf -> /usr/lib/VBoxGuestAdditions/mount.vboxsf,可以发现路径比并不存在。
b.如果/sbin/中没有mount.vboxsf文件(有则删除),建立链接文件:
ln -s /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions/mount.vboxsf /sbin/mount.vboxsf
没有任何error则表示挂载成功。