在Ubuntu(各个版本)上安装virtualbox

本文介绍如何在Ubuntu 17.04, 16.10, 16.04 LTS等系统及Debian 8/7上安装Oracle VirtualBox 5.1.20版本。此版本于2017年4月18日发布,作为维护版本,它提高了稳定性并修复了回退问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

登录 http://47.92.39.225:8080/ 查看更多文章



Oracle VirtualBox 5.1.20 has been released on Apr 18, 2017. Oracle VirtualBox 5.1.14 is the maintenance release of VirtualBox 5.1 which improves stability and fixes regression. See the ChangeLog for more details.

This article will help you to install Oracle VirtualBox on your Ubuntu 17.04, 16.10, 16.04 LTS, 14.04 LTS, 12.04 LTS and Debian 8/7 systems.

Step 1: Setup Apt Repository

Firstly edit /etc/apt/sources.list file and add one of the following lines according to your distribution to your system. You can find your system distribution codename using “lsb_release -c” command from a terminal.

For Ubuntu 17.04 ("Zesty")
deb http://download.virtualbox.org/virtualbox/debian zesty contrib

For Ubuntu 16.04 ("Xenial")
deb http://download.virtualbox.org/virtualbox/debian xenial contrib

For Ubuntu 14.04 ("Trusty")
deb http://download.virtualbox.org/virtualbox/debian trusty contrib

For Ubuntu 12.04 LTS ("Precise Pangolin")
deb http://download.virtualbox.org/virtualbox/debian precise contrib

For Debian 8 ("Jessie") 
deb http://download.virtualbox.org/virtualbox/debian jessie contrib

For Debian 7 ("Wheezy")
deb http://download.virtualbox.org/virtualbox/debian wheezy contrib

Step 2: Setup Oracle public key

After adding required apt repository in your system, download and import the Oracle public key for apt-secure using following commands.

$ wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
$ wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -

Step 3: Install Oracle VirtualBox

After completing above steps, let’s install VirtualBox using following commands. If you have already installed any older version of VirtualBox, Below command will update it automatically.

$ sudo apt-get update
$ sudo apt-get install virtualbox-5.1

Step 4: Start VirtualBox

We can use dashboard shortcuts to start VirtualBox or simply run following command from a terminal.

$ virtualbox

virtualbox-on-ubuntu

### 如何在 VirtualBox安装 Ubuntu Server #### 准备工作 为了顺利安装,在开始之前需确认已下载适用于服务器版本的 ISO 文件。可以从官方 Ubuntu 网站获取最新版本的服务器镜像。 #### 创建虚拟机 启动 VirtualBox 并点击新建按钮创建新的虚拟机实例。输入名称时建议包含操作系统信息以便识别,选择类型为 Linux , 版本应匹配所使用的 Ubuntu 服务端版本[^3]。 设置分配给该虚拟系统的 RAM 大小,对于大多数应用来说,默认推荐值通常就足够了;不过如果运行内存密集型应用程序,则可能需要调整此数值。 接下来配置存储空间,可以选择动态扩展磁盘以节省主机硬盘资源,这允许 VDI 文件随着实际数据量的增长而增大。 #### 安装过程 当一切准备妥当时,通过选择刚才创建好的虚拟机并按下启动键进入安装界面。此时会加载先前指定位置处放置的 .iso 映像作为光驱介质来引导系统初始化流程。 按照屏幕上的提示逐步完成语言、键盘布局的选择以及网络连接检测等操作。值得注意的是,在分区环节里有多种方案可供挑选——可以采用简易模式让程序自动处理未被占用的空间,也可以手动精细规划各个挂载点及其大小分布情况。 一旦到达软件选择页面,由于这是针对无图形界面环境设计的操作系统映像,因此默认不会勾选任何额外组件。除非特别需求,一般保持原样继续前进即可[^2]。 最后一步便是设定 root 密码和个人账户详情,完成后等待片刻直至整个部署结束,并移除安装媒介重启机器验证是否成功进入了命令行登录状态。 #### 配置增强功能包 安装完毕后可考虑进一步提升用户体验与效率的方法之一就是装载 Oracle 提供的 Guest Additions 工具集。它能够改善显示效果、简化剪贴板交互方式并且支持拖拽文件至宿主之间传递资料等功能特性[^1]。 赋予用户访问共享文件夹权限可以通过如下命令实现: ```bash sudo usermod -a -G vboxsf [username] ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值