In many linux distributions (at least the ones based on debian), virtualbox can be installed directly in console with or without third-party repository, example:
Ubuntu repo:
apt install virtualbox virtualbox-ext-pack
or vbox repo:
echo "deb http://download.virtualbox.org/virtualbox/debian $(lsb_release -sc) contrib" | tee /etc/apt/sources.list.d/virtualbox.list
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | apt-key add -
apt -y install virtualbox-6.1
export VBOX_VER=`VBoxManage --version|awk -Fr '{print $1}'`
wget -c http://download.virtualbox.org/virtualbox/$VBOX_VER/Oracle_VM_VirtualBox_Extension_Pack-$VBOX_VER.vbox-extpack
VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-$VBOX_VER.vbox-extpack
What is the difference between both installation methods and which is the most recommended?
Very Important:
The question is NOT about why virtualbox doesn't work properly in Ubuntu 20.04, from ubuntu repo (I know it doesn't work as it should. See bug discussion HERE). The question is about the installation methods and the differences between two methods. For example why in some distributions (or versions) it works well with Ubuntu repo and in others virtualbox repo is necessary because Ubuntu repo does not work as it should
sudo apt virtualbox
with no problems. – Pilot6 May 12 '20 at 20:40