Menu
InformatiWeb
  • Index
  • Courses
  • Tutorials
  • InformatiWeb Pro

Login

Registration Password lost ?
FR
  • IT
    • Articles
    • Backup
    • BIOS
    • Live CD
    • MultiBoot
    • Security
    • Virtualization
    • Web
    • Windows
  • InformatiWeb
  • Courses
  • IT
  • Learn to virtualize machines with VirtualBox
  • Install VirtualBox on Linux
27 / 32
  • Install guest additions on Linux
  • Hardware virtualization not available
  • Virtualization
  • 06 October 2018 at 11:57 UTC
  • Lionel
  • 1/2

Install VirtualBox 7.0 / 6.0 / 5.2 on Linux (Debian / Ubuntu) thanks to packages or from its official website

As you may know, VirtualBox is multi-platform. Which means that you can install this virtualization solution on many platforms including : Windows, Mac OS X, Linux (Debian, Ubuntu, ...) and Solaris.

To install VirtualBox under Linux, you have 2 possibilities :
- use the package system of your distribution, but you may not get the latest version of VirtalBox
- directly download the ".deb" or ".run" file for your Linux distribution from the official VirtualBox website : in this case, you will have the latest version of VirtualBox

Tutorial made on Debian 7.7.0 x64 for the installation of VirtualBox 5.2.
Tutorial also tested on Ubuntu 22.04.1 for the installation of VirtualBox 6.1 and 7.0.2.

  1. Installation via packages
    1. Installation of VirtualBox
    2. Installation of VirtualBox extension pack
  2. Installing the latest version from the official VirtualBox website
    1. Installation of VirtualBox
    2. Installation of VirtualBox extension pack

1. Installation via packages

1.1. Installation of VirtualBox

To begin, edit the list of package sources.

Bash

vi /etc/apt/sources.list

In this file, add the line below.
Note : replace <distribution_name> with the name of your Linux distribution (right value) :

  • Ubuntu 17.10 : artful
  • Ubuntu 17.04 : zesty
  • Ubuntu 16.10 : yakkety
  • Ubuntu 16.04 LTS : xenial
  • Ubuntu 14.04 LTS : trusty
  • Ubuntu 22.04 LTS : jammy
  • Debian 9 : stretch
  • Debian 8 : jessie
  • Debian 7 : wheezy

Plain Text

deb https://download.virtualbox.org/virtualbox/debian <nom_de_la_distribution> contrib

From Debian 8 (Jessie) or Ubuntu 16.04 (Xenial), download and store the new public key using this command:

Bash

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

For older Linux distributions, use the command :

Bash

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

Then, update the package list.

Bash

apt-get update

If you get this error :

Plain Text

E: Le pilote pour la méthode /usr/lib/apt/methods/https n'a pu être trouvé.

Install the "apt-transport-https" package and then restart the update of the package list.
Note : answer "O" to the "Should these packages be installed without verification" question.

Bash

apt-get install apt-transport-https

To install VirtualBox 5.2.x, install the "virtualbox-5.2" package.
Note : as indicated at the beginning of the tutorial, you may not get exactly the latest version of VirtualBox.

Bash

apt-get install virtualbox-5.2

To install VirtualBox 6.0.x, install the "virtualbox-6.0" package.

Bash

apt-get install virtualbox-6.0

To install VirtualBox 6.1.x, install the "virtualbox-6.1" package.

Bash

apt-get install virtualbox-6.1

Once the installation is complete, launch VirtualBox from the GUI of your Linux distribution.

At the time of writing this tutorial, the installation of this package allowed me to install VirtualBox version 5.2.14 instead of the latest version 5.2.18 available on the official website of VirtualBox.

Source : Download VirtualBox for Linux Hosts.

1.2. Installation of VirtualBox extension pack

If you want to install the VirtualBox extension pack to support the VirtualBox RDP, PXE boot, ... just download these extensions from the VirtualBox site in the same version as VirtualBox.

For this, you can do it on the command line (root rights required).

Bash

su

Download the extension pack with the command below.
Note : replace "<vbox_version>" with your version of VirtualBox.
For example : replace "<vbox_version>" by "5.2.14".

Bash

wget https://download.virtualbox.org/virtualbox/<vbox_version>/Oracle_VM_VirtualBox_Extension_Pack-<vbox_version>.vbox-extpack

Then, install it like this :

Bash

VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-<vbox_version>.vbox-extpack

The license will be displayed in the terminal.
Note : answer "y" to the question asked at the end of the license.

Plain Text

VirtualBox Extension Pack Personal Use and Evaluation License (PUEL)

License version 10, 20 July 2017

PLEASE READ THE FOLLOWING ORACLE VM VIRTUALBOX EXTENSION PACK PERSONAL
USE AND EVALUATION LICENSE CAREFULLY ...

Do you agree to these license terms and conditions (y/n)?

The installation is done.

Plain Text

License accepted. For batch installation add
--accept-license=56be48f923303c8cababb0bb4c478284b688ed23f16d775d729b89a2e8e5f9eb
to the VBoxManage command line.

0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Successfully installed "Oracle VM VirtualBox Extension Pack".

Once installed, you can check it via the "File -> Preferences -> Extensions" menu of VirtualBox.

Si vous voulez le télécharger et l'installer depuis l'interface graphique de votre distribution Linux, ouvrez le navigateur web de votre distribution Linux et allez dans la section Downloads du site de VirtualBox.
Sur cette page, repérez la partie "VirtualBox x.x.xx Oracle VM VirtualBox Extension Pack" et cliquez sur le lien "All supported platforms".

If you want to download and install it from the GUI of your Linux distribution, open the web browser of your Linux distribution and go to the Downloads section of the VirtualBox site.
On this page, locate the "VirtualBox x.x.xx Oracle VM VirtualBox Extension Pack" section and click on the "All supported platforms" link.

Once the download is complete, launch VirtualBox and go to the "File -> Settings" menu.

In the "Extensions" tab, click on the + icon to the right of the list.

Select the "Oracle_VM_VirtualBox_Extension_Pack-x.x.xx.vbox-extpack" file you just downloaded and click Open.

Confirm the installation of this extension pack.

Accept the VirtualBox license.

The extension pack is installed.

Next page

Share this tutorial

Partager
Tweet

To see also

  • Hyper-V - Coexistence with VirtualBox or VMware Workstation

    Virtualization 8/30/2019

    Hyper-V - Coexistence with VirtualBox or VMware Workstation

  • VirtualBox - Clone a virtual machine (VM)

    Virtualization 8/25/2018

    VirtualBox - Clone a virtual machine (VM)

  • VirtualBox - Configure settings of your VMs

    Virtualization 7/22/2018

    VirtualBox - Configure settings of your VMs

  • VirtualBox - Connect an USB key to a VM

    Virtualization 11/6/2020

    VirtualBox - Connect an USB key to a VM

Comments

You must be logged in to post a comment

Share your opinion

Pinned content

  • Useful softwares
  • Our programs
  • Terms and conditions
  • Share your opinion

InformatiWeb Pro

  • Win. Server administration
  • Linux Administration
  • Virtualization

Contact

  • Guest book
  • Technical support
  • Contact

® InformatiWeb.net 2008-2022 - © Lionel Eppe - All rights reserved.

Total or partial reproduction of this site is prohibited and constitutes an infringement punishable by articles L.335-2 and following of the intellectual property Code.