VirtualBox中linux虚拟机和主机间的共享文件设置
设置共享文件路径
点击虚拟机 设置-->选择 共享文件夹

(图1 设置共享文件夹)
设置共享文件夹路径
- 1 选择路径
- 2 填写自定义的共享名称(在后面需要与挂载路径相对应)
- 3 设置自动挂载/固定分配

(图2 设置共享文件路径属性)
安装VirtualBox增强工具
先安装必备的包
执行下面的命令:
yum install -y gcc gcc-devel gcc-c++ gcc-c++-devel make kernel kernel-devel
安装完后,重启虚拟机:
shutdown -r now
安装virtualBox增强工具
点击 设置-->点击 安装增强功能...

(图3 点击设置)
自动执行安装 或者 进入目录/media/VBOXADDITIONS_5.1.2_108956,执行命令
./VBoxLinuxAddtion.run
得到输出内容
[root@localhost VBOXADDITIONS_5.1.2_108956]# ./VBoxLinuxAdditions.run
Verifying archive integrity... All good.
Uncompressing VirtualBox 5.1.2 Guest Additions for Linux...........
VirtualBox Guest Additions installer
Removing installed version 5.1.2 of VirtualBox Guest Additions...
vboxadd.sh: Stopping VirtualBox Additions.
vboxadd-service.sh: Stopping VirtualBox Guest Addition service.
Copying additional installer modules ...
Installing additional modules ...
vboxadd.sh: Building Guest Additions kernel modules.
vboxadd.sh: You should restart your guest to make sure the new modules are actually used.
vboxadd.sh: Starting the VirtualBox Guest Additions.
You may need to restart the the Window System (or just restart the guest system)
to enable the Guest Additions.
即安装成功!
挂载共享文件夹
切换到root用户输入挂载命令:
sudo mount -t vboxsf shared_file /home/xingoo/shared
注意格式为
sudo mount -t vboxsf 共享文件夹名称(在设置页面设置的) 挂载的目录
然后进入/home/xingoo/shared,就可以看到windows中的文件了

(图4 windows文件)
[root@localhost shared]# ll
total 337516
-rwxrwxrwx. 1 root root 149599799 Aug 15 21:29 apache-hive-2.1.0-bin.tar.gz
-rwxrwxrwx. 1 root root 196015975 Aug 15 21:31 hadoop-2.6.4.tar.gz
其他使用技巧
如果宿主机是windows经常需要来回的拷贝内容,那么可以打开【共享粘贴板】,步骤为:
设备-->共享粘贴板-->双向
VirtualBox中linux虚拟机和主机间的共享文件设置的更多相关文章
- VirtualBox中Linux虚拟机与主机共享文件夹
VirtualBox中Linux虚拟机与主机共享文件夹 一.Linux虚拟机安装增强功能 二.点击虚拟机 设置-->选择 共享文件夹-->点击右侧的带加号的文件夹图标,执行下面的操作1. ...
- VMWare中Linux虚拟机设置静态IP上网的设置方法
VMWare中Linux虚拟机设置静态IP上网的设置方法 标签: vmwareLinux虚拟机securecrt静态IP上网 2016-05-18 02:30 702人阅读 评论(0) 收藏 举报 ...
- Virtualbox中Linux添加新磁盘并创建分区
原文:https://www.linuxidc.com/Linux/2017-01/139616.htm ----------------------------------------------- ...
- SSH连接virtualbox中的虚拟机
SSH连接virtualbox中的虚拟机 SSH 与 Virtualbox 使用virtualbox创建虚拟机进行工作,可以有效地减少本机环境与工作环境之间的相互影响.但Server虚拟机的界面实在太 ...
- VMware中Linux虚拟机与Windows主机共享文件夹
VMware下Linux虚拟机与Windows主机共享文件夹 1. 安装vm-tool 2. 开启共享文件夹 虚拟机->设置->选项->共享文件夹"右边选择"总是 ...
- virtualbox中linux系统与windows实现共享文件夹
最近有一次,需要在linux获取在我windows系统里的安装包,但是呢不论如何也拿不过去. virtualbox虽然提供了双向拖放,但是实在是太不健壮了,感觉基本就没好使过. 于是我想到了用共享文件 ...
- virtualbox中的虚拟机和windows共享文件夹
http://www.jianshu.com/p/4e3c8b06cb06 为什么要共享文件夹? 在工作的过程当中会使用到不同的软件开发环境,php的,python的,nodejs的为了隔离这些应用环 ...
- virtualbox中centos虚拟机网络配置
本文讲述的是如何在Oracle VM VirtualBox安装的CentOS虚拟机中进行网络配置,使得虚拟机可以访问宿主主机,也能访问外网,宿主主机可以访问虚拟机,虚拟机之间也可以相互访问. 在Vir ...
- 解决xshell无法连接virtualbox中的虚拟机(Ubuntu18.04)的问题
遇到这个问题第一反应是是否安装相应的组件: sudo apt-get install openssh-server 开启防火墙端口 firewall-cmd --zone=/tcp --permane ...
随机推荐
- servlet验证2
登录界面 登录成功后 数据库 地址:https://gitee.com/lgcj1218/j2eehomework/tree/master
- js 点击图片放大,再点击缩小还原
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- [Android]Android开发艺术探索第1章笔记
1.1 Activity 的生命周期全面分析 1.1.1 典型情况下的生命周期分析 onPause: 正在停止,正常情况下紧接着 onStop 就会被调用,然后新的 Activity 执行 onRes ...
- Diophantus of Alexandria
Diophantus of Alexandria was an egypt mathematician living in Alexandria. He was one of the first ma ...
- hdu6440 Dream 2018CCPC网络赛C 费马小定理+构造
题目传送门 题目大意: 给定一个素数p,让你重载加法运算和乘法运算,使(m+n)p=mp+np,并且 存在一个小于p的q,使集合{qk|0<k<p,k∈Z} 等于集合{k|0<k&l ...
- svg图转canvas,完全阔以的
遇到的问题:页面中存在svg画的图,也存在canvas图,在用 html2canvas 截取页面的图就导致有图画缺失,至少我需要的缺失了. 一.如果页面单纯的存在一个svg画的图,转为canvas就很 ...
- BestCoder Round #66 1002
GTW likes gt Accepts: 75 Submissions: 261 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 1 ...
- Codeforces 316C2 棋盘模型
Let's move from initial matrix to the bipartite graph. The matrix elements (i, j) for which i + j ar ...
- Jupyter notebook介绍以及安装
一.Jupyter介绍 Jupyter Notebook是以web交互式的编程接口,是IPython notebook的升级版本.主要是针对python,另外支持运行 40 多种编程语言.Jupyte ...
- spring boot 系统启动时运行代码(1)-@PostConstruct
Application.java import org.springframework.boot.SpringApplication; import org.springframework.boot. ...