Tuesday, August 28, 2018

Ubuntu. Install VirtualBox from Oracle.

Official manual from Oracle is not clear enough. Quick steps:
  1. Delete old VirtualBox if installed:
    sudo apt-get purge virtualbox virtualbox-dkms
    
    Note! purge command will delete settings as well. To preserve them replace purge with remove.
  2. Add Oracle VirtualBox repository key to the system:
    wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O-| sudo apt-key add -
    
  3. Add Oracle virtualbox repository to the system:
    sudo apt-add-repository "deb https://download.virtualbox.org/virtualbox/debian $(lsb_release -sc) contrib"
    
  4. Install virtualbox-5.2 (or later) with dkms:
    sudo apt-get update && sudo apt-get install virtualbox-5.2 dkms
    
  5. Optionaly. If you had VirtialBox installed before:
    sudo /sbin/vboxconfig